Lithium ion batteries are very unforgiving of impurities and contamination. They have to be made in what amounts to a clean-room environment. The infamous Dell laptop fires of nearly 15 years ago were due to (major brand name) batteries that were contaminated with microscopic metal particles. Lithium batteries also have to be charged very carefully. IIRC, the battery fires that killed off a new line of Samsung cell phones was due to an improper, too aggressive, battery charging profile.
Apple has heretofore had a great combination of designing a good charging profile and battery sources - much more expertise than luck, but it sounds like luck failed them.
Off topic somewhat, if Nissan or Tesla or ... ever have a bad batch of batteries or screw up their battery charging control firmware ... Carbecue Time!