The Catechisms, and the Pope speaking as a theologian, are acts of the "authentic" magisterium. The "authentic" magisterium is not infallible.
The ordinary infallible Magisterium is the reiteration of established teaching in the Church, for example when a Pope says, "the teaching of the Church has always been such and such as our venerable predecessor stated, 'X, Y, and Z'..."
From the CCC: 2267... "the traditional teaching of the Church does not exclude recourse to the death penalty"
This is part of the ordinary infallible Magisterium. Capital punishment, "the legal and judicious exercise of which they [civil authorities] punish the guilty and protect the innocent is just" (Trent Catechism) is supported (not merely 'not excluded' like the CCC states- an example of why the CCC is a bad catechism) by the constant teaching of the Church, both Scripture and Tradition.
Continued from the CCC...
"...if this is the only possible way of effectively defending human lives against the unjust aggressor"
This is novel theological speculation. That is why there is no reference in the CCC to Scripture or Tradition supporting it. It may be part of the authentic fallible magisterium, but it is odds with the Ordinary Infallible Magisterium.