"The problem with speaking out against oppression is that one spends most of one's time defending scoundrels, for it against scoundrels that oppressive laws are first aimed, and oppression must be stopped at the beginning of it is to be stopped at all."
Once you have the idea enshrined in law that it is possible to commit an action that means you no longer have rights, the next group in power can expand upon the list of actions that cause someone to forfeit their rights.
A society that said murderers and child molesters have sacrificed the right to life, food, water, healthcare, etc may one day be ruled by people who feel that queerness, catholicism, or disagreeing with the government are crimes of an equal severity; and that just as murderers and rapists have sacrificed their basic rights, so too then have members LGBTQ community, or Christians, or people who like the color red, or literally any group the ruling class finds it politically advantageous to dehumanize that day.
Because the laws that say if someone does something "wrong enough" they no longer "deserve" to have rights already exist. And now it's up to that same government and that same society that passed those laws to decide what "wrong enough" to "deserve punishment" means.
This is why everyone has to have rights. The public needs to be protected from criminals. Criminals need to be prevented from committing crimes. "Punishing" someone for doing something "wrong" because "they deserve it" has absolutely no place in an organized government legal system and thus should never be invoked as a reason to support a law. "Prosecuting" someone for doing something "illegal" because "it is necessary to restrict the harm that people can do in order to create the best society possible for everyone who lives in it and keep the proverbial trains running on time" arguably does. I say arguably because I'm not generally a fan of laws and government, overall.
But I do think we should all be operating from the perspective of understanding that you don't (shouldn't) pass laws against things because they're "wrong." You pass laws against things because they're *harmful. You don't prosecute law breakers because they "deserve to be punished." You prosecute law breakers to prevent them from doing further harm. And if you, as a government, are incapable of preventing someone from doing further harm without executing them, you have no place in a civil society. It's short sighted, it's reactionary, it's unimaginative, it's dangerous, it's malicious, and it's unnecessary. Further, if it was actually true - which it functionally is not - it would be symptomatic of woeful incompetence and mismanagement.
We can put a man on the moon, we can annihilate cities on the opposite side of the world, we can build a society on a foundation of machinery that runs off the ancient liquefied muck left over from everything that's ever died, but we can't keep dangerous or amoral people ethically incarcerated without resorting to execution? Preposterous.
If they are a human homo sapiens anthropomorphic primate person of our species, they are not capable of doing anything to forfeit their human rights. Human rights are unconditional. It doesn't matter what they've done. Humans have human rights.
I can see the existence of scenarios where it might be necessary for one or more people to kill one or more other people as a necessary act of self defense, or self preservation.
But I don't think State Sanctioned Executions have ever been an example of that.