As a chemist who is familiar with practically every industrial chemical, I can say that there is no simple answer to your question about using water for a chemical fire. The answer depends on the chemical. Some chemicals are water soluble and burn easily. Fires involving some of these chemicals can be extinguished easily with water because the chemical dissolves in water and is no longer floating on the surface of the water. Other chemicals won't burn but they can react with water to produce toxic or corrosive gases that easily could overwhelm the firefighters and anyone in the vicinity. The key to handling any situation involving a chemical fire or spill is to know what you are dealing with and to take actions that are appropriate for the specific chemical involved.
Here's a list of all of the rail cars involved in the accident in East Palestine
As a chemist who is familiar with practically every industrial chemical, I can say that there is no simple answer to your question about using water for a chemical fire. The answer depends on the chemical. Some chemicals are water soluble and burn easily. Fires involving some of these chemicals can be extinguished easily with water because the chemical dissolves in water and is no longer floating on the surface of the water. Other chemicals won't burn but they can react with water to produce toxic or corrosive gases that easily could overwhelm the firefighters and anyone in the vicinity. The key to handling any situation involving a chemical fire or spill is to know what you are dealing with and to take actions that are appropriate for the specific chemical involved.
Here's a list of all of the rail cars involved in the accident in East Palestine
https://www.wpsdlocal6.com/train-32n---east-palestine---derail-list-norfolk-southern-document/pdf_e6d7a28c-aed8-11ed-8b65-bfeccb67b128.html
Three of the four tank cars containing vinyl chloride did not leak, but they were still vented and burned anyway. WTF!