While running a program, Mach3 occasionally stops executing the written code and begins to SLOWLY move any number of axes in random directions. After resetting the program and rebooting the computer the program will run flawlessly for many cycles. Eventually, though, the same behavior begins to show up again.
No, Mach per se does not do that. Accept that and move on.
Oh, and what OS, what version of Mach, and what interface (I/O device) are you using anyhow? Without that info - hopeless.
You could have a corrupted operating system of device driver.
You could have a corrupted installation of Mach.
You could have a corrupted I/O device, be it PP, USS or ESS or whatever.
You could have defective electronics.
You could have defective encoders (if using servos)
You could have a faulty power supply to the drivers.
I am sure I have missed lots of other possibilities.
Cheers