I'll try and respond in order. It is quite possible that the valve couldn't be closed (various reasons, including corroded parts inside or simply to much escaping gas) Remember, it's under pressure to keep it liquid. To my knowledge, limited to my years of service ending in 2008, there is no "leak stopper" or sealer. Maybe there is now, I haven't kept up. #2 Ammonia likely was already fully expended from the system in the Thailand leak - up to the next closed valve. In the case of say, a 100 lb. refill tank (looks like a big lpg tank but beefier) a faulty valve or unscrewing past a certain point will be a big surprise to the tech. Once I had an assistant who did exactly that on a routine replenish to our holding tank, and the 100 lbs of instantly converting liquid to gas, emptied in about 3 or 4 seconds. I had time to stop him from trying to rethread the valve - even with heavy rubber gloves, he would have had frostbite or worse. This much ammonia dispersed quickly, but the surrounding businesses complained a lot. By the time the complaints reached the city's manager, even the smell was gone. Remember, 5ppm can be detected but it's not really a danger - think of household ammonia sold in the US ( I never see it in Thailand) The fire was out of control in our situation before the f.d. arrived and the decision was made by them & plant managers to let it finish but contain it to the building. The bad part was the various materials other than ammonia that burned, insulations, paint, oils, and lots of paper/plastic packaging supplies. But the ammonia was long dispersed. #3 Location of sensors, their maintenance would be the factor here. The sensors we used had a industry setting 25 ppm, set in potential leak areas at around 6 feet. They require periodic maintenance to do their job. I'd guess that the leak (Thailand) was small enough to be contained and don't know if the particular location of the leak could have been tied to any automatic shut-off. Usually these sensors are tied to a sound warning for the particular area; then any responder had to have the proper gear to enter the area; first to assess the location, turn off adjacent valves or see the situation is serious enough to allow the expulsion to finish and then fix the problems. Remember, NH3 dissipates very quickly and containing an active leak depends on different factors - of responders, equipment quickly available and the actual amount of NH3 that is involved. A train tank car is much different than a small ice plant's storage or refill vessels. Here's some photos of the one I witnessed. As you can see, the location was about as good as they get for quick dispersion of the ammonia.