In my opinion, death penalty is never a solution. For many reasons, but one of the biggest ones being that countries with death penalty don't have less crime for which death penalty is punishment, implying it doesn't really work. Another reason being is that when government kills someone it's doing it in the name of all, making us all murderers. Perhaps the biggest reason is making sure person actually did it. Law is not about who's right but who argues best. Time and time again we've been proven this fact, especially when the rich are involved.
Also it costs a fuckton to prosecute and in many ways is any easy way out. What, you're giving the guy who shot 3 kids and then tried to shoot himself the death penalty?
Life in prison, where the food is just enough to not starve, the healthcare just enough to continue your suffering, where you're surrounded 24/7 by the worst of humanity is about as close to hell as we know exists. Just put people in there.