My main problem with the death penalty (besides the fact it is sanctioned murder by the state) is that innocent people do get executed. Most of the information on the web is available in regard to the USA. Since 1973, at least 195 people who had been wrongly convicted and sentenced to death in the U.S. have been exonerated. Whew, just in time, eh? Except some spent decades on death row.
The Death Penalty Information Center (U.S.) has published a partial listing of wrongful executions that, as of the end of 2020, identified 20 death-row prisoners who were "executed but possibly innocent". Imagine it was your son. Would you say, "Oh well, never mind, you have to break some eggs to make an omelet."?
The death penalty in the UK was ended due to a travesty of justice. Derek Bentley was a learning disabled young man who was executed in 1953. He was convicted of the murder of a police officer during an attempted robbery, despite the fact that it was his accomplice who fired the gun and that Bentley was already under arrest at the time of the shooting. Christopher Craig, the 16-year-old who actually fired the shot, could not be executed as he was under 18. Craig served only ten years in prison before he was released. Again, if it were your son, would you say, "Well, he shouldn't have been on the job."?
And before someone says we would only execute the ones who are really evil, as if they have a flashing light on their head, a court has to abide by what evidence, often circumstantial if the criminal is not caught in the act or left DNA.