Our new work on sensory-motor inference does move closer to your "composite" objects goal. Basically, in our model, objects are defined as a set of features at different locations on the object. The "features" are just SDRs and could in theory represent anything, such as another object.
So far we have been modeling one or more columns in a single region, that is, no hierarchy. In these models the only "features" that can be associated with a location are pure sensory features. I think we would need to have at least two levels in the hierarchy to achieve a composite object as you envision them to be. But the mechanism supports compositional objects.
HTM is a theory of how the neocortex works. We view biological details as constraints. If we can solve a problem in a way that can't be understood at a detailed biological level then we don't include that solution in HTM. HTM doesn't model every biological detail, but we only leave something out if we think we understand what that detail does and determine it isn't essential for the information processing of the cortex. This adherence to biology is, as far as I know, unique to HTM.
The brain, and HTM theory, builds a predictive model of the world. Because HTMs are always predicting the next input, when an unexpected input occurs it is noticed. In our models an unexpected input results in many more cells briefly becoming active. This has two effects. One is,the burst of activity causes multiple new hypotheses to generated. In HTM theory, multiple hypotheses are represented by a union of SDRs (sparse representations) in the same set of neurons. HTMs can propagate multiple predictions forward in time in parallel. Most machine learning algorithms don't have anything like this.The second effect of the burst of activity is that it can cause the unexpected activity to travel up the hierarchy. In the brain this is believed to be one of the functions of the thalamus. As we are not yet modeling hierarchy we don't have this in our models. But the idea is established in neuroscience and we expect to add it eventually. In this way it is like the free-energy-minimization theories you mention. BTW, I wrote about this effect of the unexpected moving up the hierarchy in my book On Intelligence.
Hope that helps.