I have never found the Arduino MEGA + ESP01 to be a very reliable communications solution. The Arduino MEGA + W5100 Ethernet Shield is very reliable. Also, as you have already found, the NodeMCU ESP8266 is also a very reliable solution. The NodeMCU ESP32 is also pretty good, and it offers quite a bit more I/O vs the ESP8266.
I tried for a few months to get the MEGA + ESP01 to be reliable, but I was never successful. I am always hopeful that someone else with rise to the challenge and figure out if there is a better way to do it and issue a pull request to the ST_Anything GitHub repository.
Another option might be to use a Raspberry Pi, running my son’s much newer OmniThing project. It does not yet support all of the same devices as ST_Anything, but it runs on a Pi, or ESP8266, with very reliable WiFi connectivity.