You’re misapplying the golden rule, which is about how you would want to be treated in similar circumstances.
In the event that I were guilty of causing great harm to innocent people, then I should be killed. Not in revenge, but as a matter of mercy and justice. For in that irremediable case, my life would no longer be worth living.