The idea that "this one bad thing could happen, therefore I will do nothing that could remotely cause this one bad thing" is childish reasoning.
Take for example the R9X [0]. Instead of an explosive warhead it has a set of blades on the tip. The US has used it to assassinate single people in the passenger seat of a car while leaving the driver untouched. I'd rather this than dropping bombs on terrorists that come with a blast radius that takes out everyone else nearby.
This seems net-good to me. There are certainly people alive today because of the R9X team's work.
I think the conclusion is that there is very little justified technology development that actually betters society, except for things that actually save people from dying. Things like healthcare, utilities, civil engineering, defense, etc. However, almost all of those industries are mired in bureaucracy and are the ultimate examples of such.
Regarding defense specifically, there is no shortage of ways for maniacal dictators to raze entire cities to the ground under the justification that "bad guys were in the tunnels". That is, in effect, a solved problem – many times over. Accordingly, that is not where the research money is being spent. Rather, the goal of most new "Defense" is to achieve those same mission goals (kill the bad guys) with as little civilian casualties as possible, or to protect our own assets against such attacks as well as possible.