Main loop delay best practice + OTA flash

I came across @rickkas7 electron sample during my research. Many thanks to him for his great work!

Especially his Smart Reboot function and the Application Watchdog helped me a lot. In addition, I have also removed all “debug code” (Serial) from the firmware. So far with great results. Let’s see how stable my Electrons will be in the next few days, weeks and months.
I’ve now removed periodic restarts with these measures, especially because of the Application Watchdog.

Regarding OTA Flash, it is now in my situation that I connect only to the Particle Cloud, just if a flash is necessary. This is triggered by an own MQTT broker, where the Electron is permanently subscribed and through which the other communication required for the application takes place. This also works very well so far. More details in this thread.

Nevertheless, I will try to further optimize my code and reduce string objects as well as possible.