There was no other way. That was the whole point. When your back is against the wall and your only choices are surrender or cheat, what choice would you make? Picard would rather lose the war than compromise his own morality code.
I'm not necessarily convinced that is the case -- I think Picard well might be willing to compromise his morality in the context of an existential threat. But he's also the kind of guy who might, for instance, retire from Starfleet afterwards and spend a decade and a half beating himself up at his vineyard for it.