Hook/alater built-in operators

Is there a way to register a callback for a post-event of a built-in operator or just to alter its behavior somehow?

What I’m trying to do is to restrict the movement of objects on the Z axis so they can’t be moved above Z = some run-time computed value.

Or is there any other way to get this result?

What I tried so far:

  • constraints with a driver. The problem is that the refresh rate of movement seems to be faster than the driver so the object jumps all over the place and sometimes it can get stuck to Z > some run-time computed value.
  • SpaceView3D.draw_handler_add() with the POST_VIEW draw_type which results in the same behavior as with constraints & drivers.

So the only other method I could think of is if I can somehow register a post-hook to the built-in operators or if I can alter their behavior in some way.