Repeated heap memory restarts and a corrupt integration log

I had an unrecoverable log file damaged error, similar to this report, but I suspect mine was caused by constant restarts due to Heap memory has degraded below safe minimum, restarting. Perhaps it happened at just the wrong moment and corrupted the file; the message log shows it rebooted 246 times in about 6 and a half days before the error. It was every 5 minutes in a few bursts for a day and a half, then nothing for 5 days, then every 5 minutes for 9 hours before the log corruption.

After the log corruption is detected, it does the IotaLog: Creating diagnostic file but 5 minutes later it restarts with Reset reason: Software/System restart - and every 5 minutes after that, occasionally it’s dataLog: datalog WDT - restarting but generally no message before the restart. It was like this for a couple of days until I had time to open it up and pull the SD card. The primary data log appears to have kept recording during this process, so perhaps it was the same heap issues causing those restarts. The web UI was not responsive.

I deleted the corrupt log and things are getting back to normal, the web UI is a bit slow but that makes sense as my other two integration logs appear to be rebuilding from the time this all started. It would be nice if I could rebuild the corrupt integrator from then as well instead of just 24hrs, so I can upload the missing data… But I can live without it. I’m already getting weird data this afternoon because my ‘total use’ output is is calculated from two integrators and only one of them is reporting data.

So, that leaves me with two questions

1
Did I do the right thing to recover, or should I consider replacing the SD card just to be safe?

2
Is there any updated guidance about what can cause heap issues? Search found some old threads about influxdb causing issues, which I have been running, and about 6 months ago I noticed heap restarts after adding more output calculators (I switched to integrators which fixed the reboots). I still have two outputs run as calculators because they seemed simple, but would swapping them to integrators help? And what about my output that combines two integrators?

The other issue is wifi. I admit the wifi in this location isn’t great, RSSI around -70 to -75, that’s not something I can really fix until I am able to source a second iotawatt (I have cat6 next to the iotawatt but had to use it for CT extensions). My wifi extender can’t get much closer to the iotawatt without losing the main wifi signal.