I'm playing on console, Xbox One, current console patch 1.1.4
This has been in the game since I started playing (I think 1.0.3 or something on console) the option "Hero Deaths in Combat" when scrolled over the actual text of the option states
"The possibility of you or other heroes to die in battle"
And you can completely disable this, same thing applies to the clan member death in combat possibility
If you're referring to being executed as a prisoner, however, I've never had that happen to me and I have no idea if it even happens to the player at all, so it's just purely bad luck if it happens I guess. I've never witnessed any death or execution except for wanderers becoming "lost" so that new wanderers can rotate in and out of the save, and the option to execute Radagos in the campaign tutorial, other than that I've never actually seen any lords, nobles, or mercenaries be killed