As a career prosecutor (who also spent two years as a criminal defense attorney), I can conclusively state that a prosecutor's worse nightmare is not losing -- guilty people get off with some frequency. The worse scenario is an innocent person being convicted.
That being said the next discussion point must start with the acknowledgment that the justice system is NOT perfect and can be improved. . . .
We all want to live in, and more importantly as lawyers participate in, a system that is as fair as humanly possible. The only way to absolutely ensure there will never be a wrongful conviction is to place the bar for conviction so high that convictions become as rare as acquittals are in oppressive regimes that only give lip service to the rule of law.
There are many achievable ways to improve the system.
(1) Recruit, train and retain good people in defense, prosecution and the bench. (Salaries for judges are becoming so relatively low that it is becoming a bar to many good people taking the bench.)
(2) Ensure that modern truth-finding techniques (like DNA testing) are readily available to prevent a wrongful arrest from even going to court.
(3) Remember that in a democratic society the citizens the justice system needs to protect need to BELIEVE in the system. If they think they are being lied to about sentencing (for example), they start treating the whole system with suspicion. This doesn't mean necessarily harsher sentences, just that whatever a judge hands down should bear a close relationship to what the defendant serves.
. . .Read the full chapter of "Is Wrongful Conviction Rendering Our System Unworkable?" (4 pages)
Order the ABA's Criminal Justice 2013 through the ABA website.