People who like this idea should check out Gridlinked by Neal Asher.
It explores JUST THIS very concept as part of the setting, though more so in the next book, The Brass Man - which has to do with the story about in the setting, and how he went insane, which is normally nigh-impossible.
But, basically, in the future, the death penalty doesn't exist. Not just because its inhumane, but because bodies can be put to more good use: Its inefficient.
Criminals who have proven to be so dangerous, untreatable, sick, broken, and, again, dangerous that they WOULD have earned the death penalty before DO get mindwiped. Someone with a memcording can be re-introduced into that body as a way to escape death, though there's a long wait time, because the society isn't in the habit of producing lots of criminals. Another such option (as happened with the soldier, gant) is to take the same memcording and upload it to a Golem, a powerful herculean, commercially available android.
At one point, earthsec actually CAPTURED one of their most wanted psychopaths, a rapists and murderer, with something like over a hundred victims to their name. And a very naughty individual inside the organization made a memcording of the prisoner, and let it loose into the wild. Forcibly looping the full onslaught of a sick, depraved, insane mind through a golem until its will is broken enough to be hacked and re-written is one of the few ways a Golem can be subverted before it has a chance to destroy itself. A golem this happened to is one of the main, and most memorable characters in both books. Heartily recommended