Funny enough, the Lieber Code adopted by the Union during the Civil War, dealing with the rules of warfare, DOES actually prohibit the use of poison, so this idea would have been illegal even at the time.
What was the cost of chlorine at this point? Were they doing chloralkali at any reasonable scale? If so, this would plausibly have changed the entire evolution of warfare in the late 19th century.
There are no such thing as laws of war. War is the loss of authority and civility. Laws require both. Sure, we can make laws of war, but as we've seen time and time again, nobody follows them.
The reason chemical weapons are banned is because (they're monstrous and) they're useless. You can fire a chlorine shell and if the wind is juuust right, it'll kill anyone within a few meters. You know what else will kill anyone within a few meters? A normal artillery shell.
Except, chlorine gas can be blocked by an airtight gas mask and a chemical suit. They cost less than $500 for complete immunity to the weapon. Good luck finding a $500 flak vest that'll stop a mortar though. And meanwhile, if you want to press the attack and benefit from your chemical weapons, there's one slight problem before you advance: there's a bunch of chlorine gas in the way.
In other words, it's an unreliable and inferior weapon that gets in the way of modern military doctrine. Although there are some good niches in shitty armies by dictators who are too paranoid of coups to give their junior officers any independence or proper kit. Like the Iraq army that the US army utterly steamrolled in 2005.
You clearly have never fought and don't know that supply lines and order are crucial to war. If combat devolved into some inhumane, amoral tragedy for every interaction, nothing would be accomplished. But war is about forcibly stopping an opponent, not about going crazy and ignoring all sense or rules. Chemical weapons require an insane amount of discipline to make, move, store, use, and dispose of some of the most dangerous ordinance imaginable.
"War is lawless" is what the naive say. Experience knows better.
Just because organized lawlessness looks pretty, doesn't mean it stops being lawlessness. Israel and their genocide on Gaza for example. Great - they're organized. They're also violating civility and ignoring authority of the people who supposedly make the laws of war. Blocking aid, killing and targetting civilians...
Organization is simply enhancing the efficiency of your violence.
War is lawless is what people can simply observe. Experience apparently doesn't know shit, because you're way off the mark; you didn't even understand the argument correctly.
They're not even against murder. You can explode or bury people all you want. It's just rules especially really nasty or unnecessary murder, where people have managed to agree to give it up, and it holds up reasonably well in many cases.
You follow the rules of war because it's in your interests to do so. You treat POWs fairly, because you want your opponent to treat your own captured people fairly. You don't pull a false surrender move, because that will come back to haunt you when you need to actually surrender. You don't use chemical weapons, because using them would mean your opponent starts using them.
Granted, this tends to work better with peer powers. When there's an imbalance, the larger power often gets to do whatever they want.