Here is the manual of the servos.
OK. The servo controller outputs a pulse every time the motor makes one complete revolution (Z-phase).
Hence, work out how many complete revolutions equal your desired travel-before-lube and use a pulse counter as suggested above to trigger a timer to switch on your pump.
With $10 worth of electronic bits, it is done. No encoders, no PLCs, no brains, no macros.
There are two gotchas with this approach: if the time the pump needs to be on after teh first 50m travel is longer than it takes to do the second 50m travel, you mmight as well not bother and just have the pump on continuously.
Second, if you do moves that involve the motor repeatedly doing 99% of a revolution clockwise and then 99% of a revolution anti-clockwise, the Z-phase will not trigger. This scenario is very unlikely.