This is a particular problem with JK Wranglers running the V6 petrol and auto transmission. The fill/dip tube sits over one exhaust bank, and under heavy load eg towing, sand, the ATF can overflow out and onto the exhaust. It hasn't done the Wranglers reputation any favours either!
The common preventive methods are to either install an ATF temp gauge, or simply extend the fill tube away from the exhaust components.
Once ATF goes up though, it's very unlikely a fire extinguisher is going to be effective. All you can really do is people first, important/irreplaceable items seconds, and hope your insurance policy is up to date!