I use a very basic fog machine with a wired trigger button, which is a little inconvenient at parties. So I was looking into improving the user experience by DIYing an ESP etc. into it, but it actually turned out that a Shelly and relay perfectly fulfill the requirements and simplify the whole modification a lot. The fog machine is now controllable via Wifi and can be automated in HA! (Manual wired control still works as fallback.)
I posted a detailed description, build instructions, and an example HA automation on my blog: Smartifying and automating a cheap fog machine – Protyposis
Happy fogging!