See in your case with the military you can directly say, hey my code will be used to bomb other people possibly. But in today's times it isn't (I am sure even then) so cut and dry. I worked in AdTech industry (like 60% of the bay area techies). So the ad tech I write gets shown to millions/billions. What about ads influencing elections and then politicians waging wars? Anti-vax ads which influence people and then kill them. Scam ads. Insurance ads and then people not getting cancer meds from the same insurance. Am I responsible for those deaths? I would say Yes.
But what is the option? I feel each of us wants to draw a line based off of our morality but the circumstances don't allow us to stick to it (still gotta pay rent)
We are all on a Titanic the way I see it. It's just the DARPA guy is gonna sink first. Rest of us are just pretending to be Jack trying to be the last ones to go.