I think that the Catholic Church's position on the death penalty is a complex one. There are two fundamental issues present in the Church's historical position on the death penalty. The first premise is that the Church has historically suggested that the state has a right to use the death penalty as it sees fit. The Catechism of the Catholic Church affirms this historical position:
Assuming that the guilty party's identity and responsibility have been fully determined, the traditional teaching of the Church does not exclude recourse to the death penalty, if this is the only possible way of effectively defending human lives against an unjust aggressor.
The church's historical position clearly articulates that the defense of human lives against an "unjust aggressor" can be invoked to support the death penalty. St. Thomas Aquinas in Summa Theologiae also articulated a condition where the church's history is consistent with the right to use the death penalty: "If a man be dangerous and infectious to the community, on account of some sin, it is praiseworthy and advantageous that he be killed in order to safeguard the common good, since ‘a little leaven corrupts the whole lump." Aquinas's position speaks to how the Catholic Church has historically affirmed that states have the right to use the death penalty and must do so as a way to offend evil and prevent its spread.
Where the Church's position has seen a different exploration has been in its appeal to mercy and compassion. St. Ambrose suggested a delineation between the realities of temporal right and transcendent capacity: "...authority, you see, has its rights, but mercy has its policy." The Catholic Church has responded to the increased use of the death penalty by increasing its plea for mercy. This position has developed as a result of seeing the death penalty used so easily as a means to placate vengeance. It has also responded with a plea for mercy as a result of innocent people being killed as a result of institutional and legal miscarriages. The Church is quite direct in its belief that the death of an "innocent human being is in each and every case an intrinsic evil, against the natural moral law, and a violation of the Fifth Commandment. It is a sin against justice and against charity. EV, 57, 62, 65, 71." The rise of voices like Pope John Paul II speaks to this shift towards an appeal for mercy in the midst of widened use of the death penalty. Pope John Paul's position suggests that the modern state "ought not go to the extreme of executing the offender except in cases of absolute necessity: in other words, when it would not be possible otherwise to defend society. Today however, as a result of steady improvements in the organization of the penal system, such cases are very rare, if not practically non-existent." While acknowledging that capital punishment might have to be used, the Pope and the Catholic Church shifted their advocacy a bit in affirming the need for mercy and a call for developing another path away from state sanctioned murder. It is a position that arises from the increased use and abuse of capital punishment, reflective of one that speaks to a call for mercy and compassion. It is a slight change that suggests that individuals and societies can be agents of change and transformation, enabling us to see what can be from what is.