You’re correct to identify that your position is inconsistent - (A) not wanting the innocent to be wrongly executed and (B) wanting the option to enact retributive punishment against certain offenders.
Let’s analyze these two imperatives:
The benefits of (A) are quite self evident. It’s bad to execute people for no reason. It’s maybe the most brutal and terrifying thing the state can do to a person. And where there exists capital punishment, it happens with non-zero probability.
The benefits of (B) are that you get a nice bellyfeel that you’ve set the universe into karmic alignment. Since there’s no evidence that capital punishment has a deterrent effect on crime (this can be proven by comparison of statistics between states/countries with capital punishment and without), this is really the ONLY benefit of position (B).
So if you want to prioritize what’s best overall for reducing harm in society, then select (A). If you enjoy appointing yourself the moral arbiter of karma by enforcing who “deserves” to live and die (and killing some innocent people is a price worth paying), then select (B).
Simples!
Morpheus drinkin a forty in the death basket.