Parent poster a-french-anon may be wrong or at least is making unsubstantiated wishful claims about costs and benefits - "the errors would be extremely rare" - would they really? And would they be evenly spread over in-groups and out-groups?
But at least the question "how is that acceptable?" is in fact a question of a moral nature. It's unacceptable, but it is unacceptable because it is immoral.
How is any error rate, no matter how small, acceptable when it comes to locking people up for the rest of their lives?
While I don't like the death penalty I don't think it's that different from a very long sentence. I don't think it makes sense to say that any punishment needs an absolutely perfect error rate.
Given how flagrantly governments have been using pedophiles as an excuse for curtailing our right to privacy, I don't trust them to execute civilians for this reason (or any). False convictions (intentionally so, in worse-governed countries) are a thing, and I do not cheer for the prospect of giving the government yet another reason to murder its citizens.
Advocacy in favor of the death penalty is never about "death penalty for murderers/rapists" but "death penalty for people convicted of being murderers/rapists". Practice has shown there's a big difference
Many people that escape prison kill people immediately after doing so. Either in the process of running from the law or simply taking over a house for a few days of cover.
It seems to me like taking care of business before that happens is a more beneficial thing.