did you hook up D13 to the SuperPID’s RUN input as per:
and then rebuild GRBL with that modification you mention ?
It seems like this will do exactly what you are after (stopping/starting the router automatically upon M3/M5, on top of setting its speed via PWM)