No, it's not just because of seeing the criminal as the "good guy". We are to have compassion even for the guilty.
Where the error comes from is this false notion that people on their own have an inalienable "right to life" ... even apart from God. It comes from decades of bogus "Pro Life" rhetoric which constantly drivels on about the human being's right to life. Instead, what's REALLY at issue is GOD'S rights over life (and death). God asked Abraham to sacrifice Isaac, and his compliance was considered so praiseworthy as to have God set him up as the father of the race into which Our Lord would be born. It's sheer HUMANISM, the replacement of God with man. And, in that context, of course it makes sense that the death penalty would be wrong. In Traditional Catholic theology, however, the state exercises the authority of God over society, and so the state can take away life (for just and proportionate causes) ... precisely because God can take life whenever He so wills it. That's the distortion at the root cause of this error, the so-called "seamless garment" BS. It's only "seamless" due to their inability to make the proper theological distinctions.