If humans were sensible, building codes would be changed now to require 50 amp outlets in garages as well as high-volume sprinklers for fire suppression. Already required in most public housing situations (nursing homes, apartments), it would be fairly easy to specify that garages have sprinklers capable of cooling lithium battery car fires. It won't happen, of course, but might become a feature in high-end houses.
Going a step further, if a fire is detected, the Smart Home system could open the garage door and instruct the car to back out of the garage and away from the house. Technically easy, but getting dumb humans on board: impossible.