The fact that 5mA GFCIs are used outside some special (think about medical) cases is news to me. In Europe, it's always 30mA, and for a good reason, it gives just as good protection but is actually usable (so it can be used, not bypassed). 5mA GFCI sounds paranoid, and unusable as 5mA leakage quickly adds up from completely normal number of perfectly normal equipment, like a few computers. "False positives" is always a real safety issue in any safety system, because it will lead to people bypassing them in one way or another. Completely unusable and broken electrical system is not something people agree with...
So, you should fix your broken electrical installation first (by installing a proper 30mA GFCI), because your CNC equipment is most likely perfectly ok.
It's hard to believe that local electrical code requires this. If it does, your options are to move somewhere else, where they have heard about this great thing called "electricity" and it can be used legally; or to break the law.
Sidestepping the issue by modifying the equipment can be a real safety or EMC issue, causing actual problems. So here we see again how false security works against real security.