Isn’t this exactly the rationale used by Hitler, Stalin, Mao and Pol Pot to commit mass genocide in the name of a more ‘ideal’ future state?
These are bad actions but for "the greater good"? You don't get to have it both ways. Protecting yourself without torturing people is 100% feasible and your argument should only be heard in a war crimes tribunal from the defendant'a lawyer to ease their sentence.
Morality isn't hard, but the implementation can be.