Another fun failure mode of gas cars is that when the gas tank does finally fail, if the car is on any sort of a slope, you now have a stream of flaming gasoline to worry about...
The reality is that current lithium batteries do have a very energetic failure mode - it’s not particularly common (because they’re engineered in such a way that a battery failure doesn’t trigger a fault in the casing) but when it does happen the immediate explosive force is much greater than for a gas tank. Also because physics lithium batteries do have a greater potential to simply “go wrong” when not in active use.
That said it is obvious electric cars are the future - I just hope we can do better than the current battery tech, the power density is way down on gasoline and that means the batteries are huge, and therefore weigh enough to impact overall car efficiency.
Large energy capacity batteries, and lithium specifically, definitely pose some new and "interesting" challenges. I'm optimistic though. Gas tanks are as safe as they are today because of several decades of safety-focused engineering and iteration.
If you gave me a choice between an ICE or an EV fire, I'm absolutely going to choose the gasoline, but that's just because it's a very mature technology, with well understood practices for dealing with them. I'd be surprised if I have the same answer in 10 years time though.