Sure, but in the Church's own words, these conditions are, for all intent and purpose, non-existent. We're not talking about executing people in self-defense, for example, in a battlefield environment or one of civil anarchy, where the rule of law has disappeared and/or authorities cannot protect citizens at large. It's morally acceptable to protect oneself and to protect society, however, there is no room for the self-defense of society argument where the criminal can remain in prison for the rest of his life. Where the dignity of the innocent individual is not endangered, there is no justification to execute the criminal, whose dignity is inviolable by the mere fact that he is made in the image of God.
And attempt to kill and/or actually kill guards and inmates for a decade or so.
If you and the law would support a regime wherein such mad dogs are strapped in restraints 24 hours a day and fed remotely via an IV so they do not have to interact with any other human beings ever, then I would agree that the claim of "necessity" would disappear in such cases. So would dignity as well, of course.
But some people, even outside of war and civil anarchy, need to go.