That is not correct. The Church does not, and never has, equated abortion with the death penalty. What you’re describing is the dubious “seamless garment” theory, which is NOT Church teaching, but a theological theory. It’s not a doctrine, and some would say its heresy.
As Ratzinger himself explained when he was a Cardinal, there is a very great difference between willful destruction of innocent life, and a society’s obligation to protect its members from a convicted murderer. St. Thomas speculated about the possible redemptive influence of Capital Punishment in possibly obviating eternal punishment.
While many bishops and priests might personally have positions against Capital Punishment, and it’s true the Catechism is indeed quite strict in stipulating when it can be applied (as a last resort, serious offense, right of State to protect citizens, and so forth) the Church teaching has never opposed it de facto or absolutely.
This is all very clearly explained in the CCC, which I can quote for you if wanted.
I wrote: Me, too. Pro life is... being for life in all forms. Even the ugly ones we don't like. Because as soon as wee start saying "You're too damaged to live", it quickly follows that that same argument is applied to abortion.
From a practical point of view, that is true.
Also (willing to be corrected if I am incorrect), I cannot recall a death-penalty case that the Church was even neutral on when asked in decades.