The just use of capital punishment is to crime as nuclear weapons are to just war; they are decisive, evil-ending actions that protect the innocent from the aggressor by removing the aggressor from the earth, and to deny ourselves use of either is to open ourselves to destruction by evil men.
The Lampstand book Capital Punishment & Catholic Social Teaching: A Tradition of Support examines this.
The Mind that is Catholic: Philosophical & Political Essays is the title of an excellent book by James V. Schall, SJ, and here is an excerpt. Fr. Schall understands protecting the innocent’s mandates embedded within Catholic teaching.
“My starting point, then, is rather taken from Maritain’s phrase that “justice, brains, and strength” can and should belong together. We need no collapse before tyranny or terrorism or those who sponsor either. But we must effectively do something about them. “Peace and dialogue” rhetoric do not work in absence of a force component. The more the reality of measured force is present, the more dialogue and peaceful, including religious, means are present. In practice, this “doing” peace must include adequate and intelligent force. The intense concern that the famous “weapons of mass destruction”—and how to make them, how to use them—not fall into the hands of Muslim or other leaders is not fanciful. Every holiday since 9/11, some e-mail arrives warning us of the possible use of “dirty bombs” in some American or world city. That they have not been used, I suspect, is more because those who would use them, and such people exist, have actually been prevented by force. Units who would blow up major installations, if they could, do exist. All they lack are delivery capabilities.
“Further, I argue that our main problems are not too much force, but too little. A peaceful world is not a world with no ready forces but one with adequate, responsible, and superior force that is used when necessary. The failure to have or use such forces causes terror and war to grow exponentially. Unused force, when needed at a particular time and place, ceases to be force. But force is meaningless if one does not know that he has an enemy or how this enemy works and thinks. That latter is a spiritual and philosophical, not technical, problem. Many an adequately armed country has been destroyed because it did not recognize its real enemy. Neither is this an argument for force “for force’s sake.” It is an argument for force for justice’s sake. I am not for “eternal peace,” which is a this-worldly myth, but for real peace of actual men in an actual and fallen world. Peace is not a “goal” but a consequence of doing what is right and preventing what is wrong and, yes, knowing the difference between the two." (p. 263)