Apart from it happening all the time throughout our legal system, hence why it isn't a punishment.
And let's not pretend that mistakes don't happen in the legal process. I assume if someone accused you of a serious sex offence and you erroneously got convicted, you'd be fine with being executed...