I don't think his fear of the death penalty was his motivation for taking the plea. I think he didn't want all his dirty secrets to come out in the trial.
Taking this plea allows him to slink away into obscurity without his family or the rest of the world learning all the sick details of his crime (and everything that led up to it). His text messages, social media posts, the autopsy details, etc.
He knew they had so much evidence against him that he was going to be in prison for the rest of his life, trial or trial.