I think the ability to detect and work around corrupted memory is probably pretty standard in the controllers by now as flash RAM can only be written to (and read?) a finite number of times. So as more of the flash memory fails, it eventually runs out of space. We had this happen in certain models of copiers (my business) and the temporary solution was to pop the SD card into a computer, move all the files on the card to a new directory (which doesn't move them from their memory locations) and make new copies in the root directory. Thus the bad memory locations stayed in use by the original files and the new files which the copier would access were in previously unused areas. The better solution was to get a new SD card, but the problem was it used a proprietary format and the manufacturer did not provide us dealers with a utility to perform that format. But by then those copiers were 5+ years old and they weren't very motivated to do so.
That is a good workaround you found for the dying SD cards. As I said, it wasn't clear whether the Tesla flash memory cells were dying or they were just filling-up. Either of these is a possible cause. Many computers will fail to boot if their hard drive fills-up entirely. The system SHOULD be designed to accommodate aging flash with wear-levelling algorithms, bad block management, and error detection and correction schemes. Perhaps it wasn't, or they wrote excessively to the flash, or they used flash parts with poor specs. If the latter is the problem, it may not have been Tesla's fault; there are lots of bootleg flash chips sold by unscrupulous wholesalers, and difficult to know if you got a shipment of those until they start to fail.
These vehicles aren't even that old, the repairs would be prohibitively expensive for customers to pay for, and the manufacturer didn't provide alternative controls for safety-critical systems, hence the NHTSA is coming down on them with a recall. Regardless of the root cause, a hard lesson to Tesla on why some controls are still separate knobs on the dashboard.
When you think about all the hand-wringing about the environment, in my mind the elephant in the room is planned obsolescence, yet I don't hear any voices of authority even mentioning it. But I don't see why we couldn't begin shifting over to a repair economy rather than a replace economy. There'd still be plenty of work to go around, if not more so!
That's a larger conversation which unfortunately delves deep into politics, so no simple answer. In a completely free market economy, corporations are allowed to make their own choices as to how to design their products to maximize profit. Labour in North America has gotten more expensive over time, while most consumers look for low initial purchase price. The result is more automated manufacturing or offshoring.
At the same time, technology has evolved from mechanical systems to custom solid-state electronic systems to software systems using generic commercial-off-the-shelf (COTS) electronics. These are faster/cheaper to manufacture but more difficult to repair. Repair requires specialized skills and equipment, and parts which may not even be commercially available! COTS electronics running software systems are also a boon to manufacturers since software breaks the traditional relationship between cost of labour vs profit from goods sold: You can write software once but can sell it many times.
These systems are also largely unrepairable by the DIYer, hence contribute to planned obsolescence. On the upside, this level of technology is how companies such as Holley can afford to design and profitably sell things like bolt-on EFI kits for our old engines.
Here's where it gets political (sorry!): Government can try to shape aspects of manufacturing with various kinds of regulations (there are many, but RoHS is one example), and fees paid either by the manufacturer or the consumer to cover the cost of their eventual recycling. These may encourage manufacturers to design things that are more repairable. Some people have problems with these regulations and "taxes", sometimes the same people who would rather be able to fix their stuff than replace it. Government can't outright enforce a "repair economy" because that would imply a planned economy, not a market economy.