I don't think ModelZ will do what you want -- that seems to return the Z position of the model's origin, aka its "Standoff Height", not its overall height (unless all of your step files have their origin at their very top, which would be weird).
Altium queries in general do not make it easy to link a component to its primitives or select a component based on the properties of its primitives. A very crude way of getting what you want would be to create a component height rule for 1.25mm, run a design rule check for that rule only, and then use the "HasViolations" query filter.
I'm not aware of a good way to filter which solid models get exported, do you have that working? I would love a way to easily filter most component bodies out of our 3D exports so they are less problematic in MCAD. In the past I've done that by creating an assembly variant that has all but the most mechanically important components DNIed, but that's a pain to deal with.