VFD’s emit copious amounts of electrical noise in the RF spectrum and this can easily be picked up by any un-shielded wiring and subsequently interpreted by Mach3 as a signal (EStop, Limit, etc.).
Just a couple of suggestion…
Check that your EStop and limit switch wiring is made with good quality shielded cable with each shield connected (at one end only) to the ‘single point Earth’ at the controller end.
Your Spindle motor should be wired with shielded cable again with the shield connected, at one end only to the single point Earth.
Check your VFD manufacturers wiring instructions to make certain you have the Earth connected correctly.
Check that your single point Earth is indeed connected to EARTH.
Increase your debounce to 500.
Fit 0.1uF minature capacitors between each used input to your breakout board and the single point Earth.
I hope that one, or more of these suggestions may cure your problem.
Tweakie.