The problem that causes most of the fires is not really the chemistry, it is the poor construction of the packs, and the poor (or complete lack of) quality control of the cells being used.
(if you use a poorly made LiFePO4 cell, it's no safer than any other cell, and realistically, most of the cells out there of *any* chemistry are either poorly made, or they are recycled garbage out of failed batteries that were sent to recycling so they wouldn't end up causing fires somewhere...but recycling to people that build packs means re-using existing (defective and/or damaged!) cells, not recyclng the materials to make new *good* cells).
And the improper design and construction of the BMS controlling charge/discharge of the cells, and the improper design and construction of the charger used to charge them, and the mismatch of charger to battery (too high a charge current, especially as the cells age, etc).
Any battery can burn, regardless of chemistry. It just takes the right conditions to trigger the fire; once the energy release begins, there are "always" materials surrounding the cells that will burn and heat the cells further, contributing to the cell fire itself--but even if no further cells burn, the fire is already started in the materials (plastics, etc).
Since many fires happen when no one is there or monitoring whatever the source of the fire is, and most fires spread extremely quickly, it doesn't take the cells themselves burning to cause the fire to engulf an entire building.
Fires happen because of cells overheating and burning, but they also happen because the charger itself overheats internally, and wiring insulation (or transformer windings) fails allowing conductors to short, and fuses either not being correctly sized to blow in this event, or not even being present (with the spot for them wired across during manufacture, or bypassed by someone later on because "well, it kept blowing the fuse so I bypassed it".
).
They also happen because the BMS is designed poorly, or made with incorrect parts for the design and/or usage, and the FETs either overheat and eventually ignite the battery casing or wrapping, or the FETs fail stuck on (their most common failure mode) so they cannot stop charge and/or discharge from occuring.
In the latter failure, if a the wrong charger is used (too high a voltage) or a faulty charger (with too high a voltage) it will then overcharge the cells, and that damages them, and that damage can lead to a fire.
Similarly, mismatched cells without a BMS (which includes a BMS that has shorted FETs) would overcharge the weakest cells with the least capacity, which are already the worst-behaving and worst-properties cells, that likely heat up the most and/or already have internal damage causing their problems to begin with.
That also allows overdischarge of those cells, and so you end up with both things happening repeatedly, until a cell eventually just plain fails--it might do so benignly, but it might also do so catastrophically.
The above also applies to the unfortunately not uncomon "well, the BMS kept turning the pack off while I was riding it, or keeping me from charging, so I bypassed the FETs" (instead of fixing the actual problem of old / defective cells by replacing all of the cells with new matched ones).
The above only covers (briefly!) some of the possible failure modes that can cause a fire--there are various others including interconnect failures, cell insulation failure, environmental intrusion, wire routing allowing breakage or short, etc., that would take a few more pages to describe / list.
Since (even if it were possible to do without disassembling and testing all the individual cells in a pack, which it isn't) people are not going to make sure all the cells in all the packs they're working with are always still good, well-matched, and that all the BMSes are correctly functioning, and all the electronics in their chargers are functional, every time they use them, then there are going to continue to be battery fires.
If all the electronics were actually correctly designed, and built correctly with all the required parts, and all used genuine parts that had sufficient safety margins, and all the cells used were well-matched with each other (identical in all properties) with proper quality control processes, and assembled correctly in a pack that was designed to withstand all the uses to which it will be put (including the various mishaps that are *going* to happen to some of them in any normal usage)...there would probably be a lot less fires.
Oh, also, if the packs and chargers were all completely potted and sealed so the end-users and shops could (would) not open them and screw around with the safety features to bypass them instead of actually fixing any problems that show up.....
I am completely for the right to repair...but if you're not actually going to repair a battery, BMS, or charger, don't frock with it.
Since few people will actually bother to fix one of these things properly, it's safer if it's difficult to get into them to damage them further / make them into firebombs waiting to happen.
(if you don't know what I'm talking about, just look around this forum and you'll find various examples of "oh, I'm not going to fix it, just bypassing it because (whatever reason)").