In your weapons example the problem is nobody will admit it’s a war crime. People will see it t their own way and to this point there’s no official legal consensus about what to call it. So this is left entirely to the morals of the individuals. This isn’t always the case.
There are plenty of situations where legal barriers are put in place to prevent supplying abusive regimes (for example) with certain types of equipment, software, weapons, etc.
The fact that no one will admit that it’s a war crime is exactly the point I’m making. How do you stop that with individual morals? I probably wouldn’t work in weapons manufacturing, just like I wouldn’t write spysoftware for the NSA, but a lot of people would.
If our ethics as a society allow it, then our individual morals don’t really matter.
There are plenty of situations where legal barriers are put in place to prevent supplying abusive regimes (for example) with certain types of equipment, software, weapons, etc.