That makes sense!
I’m currently using a Wemos D1 Mini with a Circuit that’s basically the same as this:
I made some custom circuit boards that look like this:
They are cheap and you can keep the Magichome firmware and use one of the MagichomeUFO nodes in Node-Red to control it.
You can also hack these devices to run your own MQTT firmware if you wish, as I described here:
Pete.