2 things, one of which has already been said
Get an SSD and a usb cable for it. Boot off that. Be aware that not all cables are the same (have a Google for usb 3 SSD cables for home assistant before you buy one). There’s a little song and dance you have to do to boot off ext SSD but it’s not hard and doesn’t take long (Google).
That combo will eliminate the SD card issues in the future. But you also need to look into the Google Drive backup add-on. Get that for when shit goes down.
With those two things you should be all set and eliminate this ever happening again. If it does you have a backup.
I got a cheap Nest E thermostat on eBay from a charity shop seller. It cost me like £15.
Replaced my dumb one with it, then hooked it into HA and made a sensor from all my motion sensors and door sensors which all have temperature gauges in them.
Conglomerated those sensors into one that tracks the average (making sure to only have so many per floor so as not to skew the data to one part of the house) then made a sensor called “Is it cold enough to have the Heating on?” which acts as a simple switch with a lower and upper limit.
Now my heating only comes on when I need it to based off the temperature of the whole house instead of that one place the dumb thermostat was based.
The display unit for it died after less than a year, replaced that for another £20 on eBay and synced the new unit to the Thermostat on the wall.
So for less than £50 and some smarts I’ve upgraded my heating, and saved money on the bills (since it only comes on when we need it to rather than based on the temperature of one location).
I’m not particularly recommending Nest since I have no experience with other manufacturers, but I managed to do it all on the cheap and I’m quite pleased with the results