Hi
This brought back vague memories of when I tried something similar a couple of years ago, to overcome a logic problem on a machine, which I eventually cured the proper way by rewiring.
The answer is yes you can edit the macros, but you have to go outside the DoSpinC(C)W() functions if you want to change rotation direction from M3.m1s
I don't know exactly where the macro comes in the chain of processing a M3 GCode call, but as you say, simply substituting DoSpinCCW() does not produce the desired effect, albeit commenting out the command will prevent any rotation, so Mach does look for it in the macro.
I set the contents of M3.m1s as
If IsActive (input1) Then
code "M4"
Else
DoSpinCW()
Message "CW Rotation"
End If
and M4.m1s as
DoSpinCCW()
Message "CCW Rotation"
This gives me the desired effect in simulation, depending upon the state of input1 and a visible confirmation that the M4 call went through on the message line.
Hopefully will work for you
regards
Melee