On the table saw is a good idea. I’ve been thinking of a “fireproof” box of some sort to aim the flames away from danger. I haven’t settled on a design, though.
Something like an old metal drawer from a desk or tool chest would work. Make a metal screen to fit over it so air can still circulate for cooling, but minimize any flame spread if there is a fire.
I think it’s bad to put water on a battery fire like that. Maybe keep one of those fire blankets handy too.