Whatsminer tool has remote control functions, one of them is (Suspend/Resume) mining, so that is somewhere to start from, also, if you don't use the latest firmware for the M20s you can still access the miner via SSH, so you can run a script to suspend and resume.
https://i.ibb.co/5YB5wPH/Whatsm.pngIf that doesn't work out, you can always use something like "Sonoff Basic Smart Remote Control Wifi Switch" that controls a contactor that controls the miner power input, these smart plugs come with their own applications which you can shutdown/turnon from anywhere or set a timer for them, they switch costs about 3-5$ and the contactor is probably in the $15 range, not a very expensive project if the software road turns out to be a little bumpy.
Whatsminer Tool could have been a solution. Unfortunately they only support a 64Bit Windows application, but my existing miners are getting their "should I mine or should I not mine" information from a 32Bit raspberry pi. If nothing else works I could consider setting up an additional computer for managing Whatsminer devices (hopefully not).
Using an outdated firmware may be another option. I am unsure how well this scales and if there are any security concerns running outdated firmware on a large number of devices. I may be getting some newer Whatsminers (like M30s) down the line as well and they might not be able to run outdated firmware. If the manufactures only stopped closing ssh ports all the time

.
As I have already stated, controlling the power input could harm the hardware in the long run. So I am hesitant to try this. Or am I wrong in this regard?