Esp8266-01 sometimes unresponsive and restarting

If it works fine without any load across the relay, but you have problems when a load is applied then I’d say it sounds like electrical.
Having said that, it could be badly written code and just coincidence that you see the disconnections when there is a load applied.

Most relay boards designed for MCUs have optisolation, but I’m not sure that would help in this case, but it might be worth you getting hold of one and trying it.
I’d be tempted to put some suppression on the live side of the relay, in the form of a smoothing capacitor, and see if that helps.

It reminds me of this thread, which might be worth you reading through…

Pete.

1 Like