Easy to solve with accountability and its friend the chilling effect. Prosecutors should serve whatever wrongful time they put someone in jail for. I bet we would see wrongful convictions drop to zero.
But then prosecutors would be much less willing to take acceptable risk when called for because the punishments are so draconian. That being said, letting a dangerous criminal free is much better than having a single innocent incarcerated.
There is a concept I only just learned about yesterday which covers this idea:
I know. I addressed the chilling effect as a net positive. Given the overwhelming power the state has in the trial process, it's the only check I find appropriately/equally as potent.