Program the drives with the GDtool for the maximum practical speed, and acceleration, then ensure Mach3 settings are less than you have set in the drives, so it can't be commanded to exceed the limits.
If it still does it, then Mach3/PC train of pulses is being interrupted, causing impossible acceleration/deceleration demands.
Encoder count errors?
There may be dust on the encoder disk, or more likely magnetic whiskers on the hall sensor magnet.
To remove magnetic whiskers (and you might not be able to see them!) use sticky tape. Spottlessly clean is mandatory.
Faulting will occur if the hall sensor puts out an impossible pulse sequence, which is always quadrature, but breaks the quadrature transition possibilities.
Motor turns the wrong way (or the hall sensor says it does) and the encoder and hall sensor direction sensed mismatch.
It is also possible noise is getting into the wiring between the motor and the controller. Separate the power and signal cables.
Make sure shields are only connected at one end.
Super X3. 3600rpm. Sheridan 6"x24" Lathe + more. Three ways to fix things: The right way, the other way, and maybe your way, which is possibly a faster wrong way.