The strange translation is beceause it double translates.
This is very complex
Not only that you need to figure out a hierarchy that does not violate the dag and inst cyclic so thet there will be no too early bailouts by maya computation engine.
otherwise the math is simple its just basically a closet point on surface problem, which is well known mathematics, hell maya has a node that encapsulates this. However the
dag limitation is WAY more complex a problem.
So heres some toughts on this:
For starters the ball and plane must be siblings. Now then the trasform must be decoupled beacsue otherwise you end up in solve loop.
Or possibly you could do this by violating mayas computation mechanism and setting a setAttr in the expression, the downside of this is that you may see mayas animation capabilities disintegrationg.
Or if you can ensure a lock on the z move you could forego thsi problem also.