A - Thanks for the question! While the Church certainly does use St. Thomas quite a bit, we should note that he isn't a one man magisterium (the teaching authority of the Church). So, while he may be the most important theologian ever (that conclusion is debatable) we do not give him any charism of infallibility.
That being said, the Church has not ruled out the use of the death penalty. It merely questions the prudence of using it in today's society. As I have stated in a previous post, the death penalty is not an intrinsic moral evil like abortion or euthanasia. In other words, the Church does not absolutely exclude a government's right to have recourse to the death penalty. In fact, a Catholic, in narrow circumstances, can support the death penalty and still be in good standing with the Church. The Catechism of the Catholic Church states:
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 the unjust aggressor.
If, however, non-lethal means are sufficient to defend and protect people's safety from the aggressor, authority will limit itself to such means, as these are more in keeping with the concrete conditions of the common good and more in conformity with the dignity of the human person.
Today, in fact, as a consequence of the possibilities which the state has for effectively preventing crime, by rendering one who has committed an offense incapable of doing harm—without definitively taking away from him the possibility of redeeming himself—the cases in which the execution of the offender is an absolute necessity "are very rare, if not practically non-existent." (CCC 2267)