There's also something I didn't think about until recently. With batteries, the ignition source is basically stored in the fuel itself! If you puncture the battery pack, there is a high likelihood that you'll end up with a runaway reaction that includes fire. If you puncture a gas/diesel tank, most of the time you'll "just" end up with a fuel leak and expel your fuel. That is, a gas leak requires a second event: the ignition of the fuel, for there to be a fire.I think the difference is the spontaneous nature of the battery fire. The traditional car fire occurs when either the car is in a crash, or when it's operating.
Now, I do think EVs are safer in that with ICE vehicles, the fuel is being transported through pumps, lines, sprayed into the engine, etc. so there are more potential points for failure. But it's worth noting that any car will be carrying large stores of energy and if you happen to damage the "tank" that holds that energy, I suspect a damaged battery pack is going to ignite more often than a damaged fuel tank.