It's true that there are massive problems with the legal system in the US, partially because people make careers by achieving high conviction rates. That means letting many guilty go free because the cases are to weak to guarantee conviction and/or or possibly convicting innocent defendants using bad witness accounts, circumstantial evidence and forced confessions.
I do think, however, if the case involves a freely given confession, video evidence, and other irrefutable proof that the defendant committed a capital offense, the death penalty would be the most just punishment.
Too often, the criminals get a reduced sentence or psych prison by claiming they were acting while high, drunk or insane. Rather than punish the act, we wind up trying to discern the intent. That leads down an path of lies, deception and skilled lawyering which seeks to argue something that's unknowable for certain.
That a crime was committed IS a certainty.