I am thinking to start using the Mega to reset the ESP and the ESP to reset the Mega automatically if a "condition" is not met.
I have looked at sending to a function to restart wifi first, if the code is intact and not messed up from some glitch. if (wifi not working) { do this }
Is there any damage to the modules if it gets reset every week or so automatically?