Incidents like this are starting to make me feel that software engineers should have a code of ethics, similar to the Hippocratic Oath. So technologies aren't abused to marginalize individuals/groups.
Nuclear weapons simulations, drone AI, smart bombs - all good. But don't you dare abuse a marginalized group!
Recent history continually shows that advances in military technology causes improvements in combatant/non-combatant casualty ratio. The smarter the bombs and missiles are, the less civilians they kill. Also, operators who only risk drones and not their own lives aren't nearly as trigger happy as pilots. And finally, a conflict between two countries is always more prolonged and bloody when the gap between their technological development and military prowess is smaller. Not to mention that MAD doctrine have prevented cold war from going hot.
So yes, working on all these technologies helps you mention helps humanity and saves lives.