People unfamiliar with prisons tend to think that the section of CCC 2267 oft quoted:
“If, instead, bloodless means are sufficient to defend against the aggressor and to protect the safety of persons, public authority should limit itself to such means, because they better correspond to the concrete conditions of the common good and are more in conformity to the dignity of the human person”
means that locking people away in prisons, even super max, means society is defended against the aggressor.
However, the situation in the United States where our legal system guarantees right of visitation and communication in even the most secure confinement—as in a super-max prison or on death row, the aggressor still has the capacity to reach out and harm the innocent, whether through the possession of contraband cell phones, information transmitted through attorneys, guards, and visitors—and it is in this context that criminal justice professionals require the continued option of capital punishment; and it is from this perspective of still being able to threaten the innocent, that the magisterium of the Catholic Church, expressed through the centuries, continues to support capital punishment.
As a former criminal—thief and robber—who spent 12 years in maximum security prisons, I can assure you that prisoners find it relatively easy to control organized criminal activity on the streets from prison, even including murder, and several examples of such are included in the book published by my criminal reformation apostolate, The Lampstand Foundation:
Capital Punishment & Catholic Social Teaching: A Tradition of Support,
amazon.com/s/ref=nb_sb_noss?url=search-alias%3Daps&field-keywords=Lukenbill%2C+Capital+Punishment+%26+Catholic+Social+Teaching%3A