Just a thought - last operation before you saw that "no Z movement" issue was drilling. Is it possible that the gcode was trying to move Z too fast? Too high acceleration? On my own machine, I have X and Y driver (EM806) fault outputs wired to the safety relay/e-stop system although that is mainly because I use a dual-motor setup on X and a stalled motor will try to twist the gantry. Thinking about it, though, my Z still uses an ancient M752 from the mk1 machine so no stall protection. But I do detune Z compared with the other axes - are you trying to use similar acceleration/speed?

Just thinking out loud - all our machines are different! Not obvious why IP/M and Mach3 would trip stall protection, though. FWIW, I've been using a wireless keyboard for a couple of years which connects via a USB dongle. Never seen any obvious problems from that area and the built-in touchpad is really useful.