This is a bad idea, because it would incentivize channeling even more people into the prison system in order to have test subjects.
Instead of more cures for diseases, we would get an equilibrium-finding economy of live human bodies, where most of the net gain is diverted to middlemen and administrative overhead. And don't forget the incomprehensible horror.
This is voluntary though. Sure the odds of more volunteering increases with the total number of bodies, but I don't think it'd be actually significant.
Sure. There isn't an inherent financial incentive here for the prison system (though an illegal one could easily develop, as it does with all else). It really boils down to the type of study and how much time gets exchanged: I'd assume the more dangerous something is, the more "time served" it's worth, for example. And of course there are all the usual caveats of determining a fair rate, ensuring informed consent, etc.
I’m kind of not joking that I think asking for medical study volunteers from prison populations in exchange for time served would put us way ahead.
Or instead of the death penalty, we try some things out that maybe might not work.
We would have cured for colds, cancers, and hair loss in a few years of human testing.