It's encouraging to note that most model Y cars ("standard range") use lithium iron phosphate batteries, which have far fewer problem with fires than lithium iron. Energy density per kilogram of lithium iron phosphate batteries is lower, but has been improving slowly. Tesla had to buy the technology from BYD.
I suspect that in a few years, batteries capable of thermal runaway will be prohibited. They're becoming unnecessary.