> Also I wonder if it is possible to put mini pressurized CO2 balls inside the battery enclosure such that if a fire happens they explode and release CO2, putting out the fire?
No, that may momentarily put out the flames but as long as the thermal runaway condition is still present it will reignite. The only way to stop a battery fire, which is actually a metal fire, is to permanently suffocate it - usually by dumping heaps of salt, cement or salt on it which melts and so removes oxygen from the fault area - and then, at least for electric cars, to dump the car in a container full of water and keep it there until dismantling, so that the water acts as a thermal buffer to prevent reignition.
No, that may momentarily put out the flames but as long as the thermal runaway condition is still present it will reignite. The only way to stop a battery fire, which is actually a metal fire, is to permanently suffocate it - usually by dumping heaps of salt, cement or salt on it which melts and so removes oxygen from the fault area - and then, at least for electric cars, to dump the car in a container full of water and keep it there until dismantling, so that the water acts as a thermal buffer to prevent reignition.