Prosecutors in America have one goal: close the case. At any cost, close the case. They are not interested in justice. They are not interested in finding the one who actually committed the crime. They are interested in closing the case. If that is “working as designed”, then we need to change the design.
There are of course ways to improve the legal system, more equal access to quality representation is my preferred improvement regardless of system, but you can't just look at one element of the system in isolation and declare the whole concept bad. That's "The CPU produces waste heat so we need to remove it completely" type logic where you find one thing that sounds unambiguously bad and ignore that it could be a symptom of great net positive function of that thing. Doesn't mean it's perfect either, just means it needs more than a shallow dismissal.