Apple has a policy of keeping a container filled with sand close by when working with batteries.
The fire is just a byproduct of the extremely fast exothermic reaction taking place in the battery.
With an intense lithium-ion battery fire the only thing you can do is calm it down a bit (with a ton of water or sand) and make sure it doesn't spread.
https://www.firehouse.com/operations-training/news/21236083/...
However, it doesn't really matter. Buy an ABC extinguisher for your kitchen and for your garage, and just use it if needed. You don't need to overthink this.
The exothermic reaction will also slow down when cooled which will further help contain the problem
https://www.firerescue1.com/community/articles/how-to-put-ou...