Sonoff / ESP8266 Issues and questions

Hi, I was just wondering about my ESP’s as they just randomly started to play up. I’ve got three connected to my lights and one to an air purifier. Basically, they randomly started to turn themselves off, on and back off in quick succession. Not only that, I keep running into an issue with the fact that I have regular power cuts so I must manual unplug and plug in the device to re-set the sonoff. Is there a way I could avoid this? Lastly, when my internet goes down my lights won’t function and the manual wall switches don’t either. I don’t have the luxury of a live and neutral going to my switches as they all seem to be switched live switches, is there any way I can easily operate the sonoff on a hardware side without being in reach of the little button?

Sorry if this doesn’t make too much sense, I’ve had a few and always get thinking of home automation etc when I have a beer or two.

What firmware are you running or are they stock? A third party firmware would probably fix all your problems. I’ve got 5+ esp devices I made running ESPEasy and haven’t had any issues.

Custom firmware, there acting as wemo devices after I followed a guide somewhere on these forums.