Other than verifying the cables are in good shape and no connections are lost.
Most of the time an axis jumps is when the tach commutator gets dirty from carbon as the brushes wear and the velocity feedback is lost.
You can remove the cap from the end of the motor, remove the encoder plate as an assembly. There will be a phenolic disk that covers the tach with the tach brushes attached to it. Note/mark its position and carefully lift it out of the housing. Now you can flush the commutator off with some contact cleaner. A small toothbrush helps to scrub between the copper commutator poles. Soak up the remaining cleaner and let dry. Flush out the brush assembly and place it back in the housing paying close attention when the brushes are going back onto the commutator, as you will need to get them to slide into their holders as the brush mounting disk goes in place.
If the axis is losing accuracy, there may be an issue with the encoder itself. I have heard that the encoder glass disk can come loose from its hub. Otherwise its output may be failing from age.