Yes, a controlled plug is a good solution.
A relatively old S9 is quite profitable with solar power, though amount generated is not so high.
Just out of curiosity, how do you imagine controlling turining on/off the miner? Some output of the inverter or measuring voltage or so?