I "de-sullied", rather rewrote my program. 0 String Objects, only global characters. I also removed a coupla bells and whistles. I re-used the SoftwareSerial at 9600 Bauds though to find out what the Hell is going on via the serial monitor (if needed).
Program Memory usage: 45%, RAM 74%(526 bytes free), freeMemory() shows 451 bytes.
Code has been running without a hiccup for a good spell now.
My conclusions (for myself at least):
- Avoid Strings like the Covid19. Don't let your software control your memory allocations and de-allocations.
- Don't be too ambitious to do a load of tasks with the memory-poor ATmega 328P. Leave sufficient memory margin to avoid spurious bugs that bite you in the ass a few hours/days later.
- Use a more powerful processor for the big jobs. I uploaded my original hungry-for-memory program on a Mega 2560 Pro. Needless to say, it works fine at the expense of the added price tag and its larger footprint (5.5x4cm) compared to a Nano.