I don’t think there is a contradiction in EV #56 only because I don’t understand it the way you do. Here are the problems with your interpretation as I see them:
The catechism (2266) teaches that retributive justice is the primary objective of punishment…all punishment. The protection of society is a secondary objective, yet 2267 ignores the primary objective altogether.
The catechism (2260) also says that the teaching of Gn 9:5-6 is “necessary for all time”, but, again, (your interpretation of) 2267 ignores that section as well.
Genesis 9:6 says that murderers are to be executed because their victims were created in the image of God, but (your interpretation of) 2267 turns that position on its head and holds that murderers are protected because they were made in the image of God.
If the protection of society is the primary objective of capital punishment, then if social scientists were able to determine that in fact it was a deterrent, 2267 would require us to vastly increase the use of the death penalty precisely because it was shown to increase our protection. How can something be considered immoral today that might turn out to be a moral requirement tomorrow based not on our understanding of doctrine but on the work of social scientists?