It’s that pesky New Testament thingy that gets in the way for Catholics.
Let’s be clear. Catholics do not forbid the death penalty.
Where does it say in the NT that capital punishment is wrong?
The issue in the Catholic Church is odd. Pope JP II put it in the Catachism and it was basically a new thing and then they had to re-write that section because it has never been a teaching of the Church that capital punishment is wrong.
They based on the necessity for CP being based on social self-defense, which they felt was covered by better prisons, but that is not the only basis for it and so I remain personally not against it, overall.