yea it's mostly people failing to use bms or failures with the battery management.
There was a massive NHTSA report on it in like 2015 after the first few years of switching to Li batteries.
They determined that battery cars were same or slightly safer regarding bursting into flames, and that the overall damage is less if an electric car burns instead of a gas one - less likely to spread, less harmful emissions in enclosed like parking garage, less shit leaking into the ground kinda stuff. and that was 2015- they've gotten a lot better since.
But that's mostly looking at like impact fires. like burst into flames from crashes. they're actually very infrequent, like less than 1 a year. interestingly the bigger risk isnt them burning, but electrical hazards if the automatic power shutoff fails - so now 1st responders need addl. training to disconnect or de-energize for electric crashes.
The scary thing about electrics is the unexpected fire from not doing anything. Just sitting in a garage and poof - firebomb.
but actually now that i'm looking into that too, it seems alot of the issues were power cord issues and stuff - like not directly the car's fault, any more than you could blame TV's for being a fire hazard if the power cord shorts.
Samsung phones had a random explodey issue w/ Li batteries a few years ago because of discrete iron particles- lil pieces of metal shavings and stuff that got into the battery materials and layered into the cells - it'd puncture the separation layers, short out and ignite the whole thing - now they have really extreme (i'd say wayyyy excessive) regulations on metal impurity.
And the dreamliner, a bunch of it's issues were Li battery safety related too.
TLDR; yeah there's a hazard, it's pretty minimal though and no more (possibly less) hazrd than alternatives, though maybe less predictable? neat-o