It is a question of vested interests and poor incentives. Elected judges and elected prosecutors - how can you not end up with poor decisions? Poorly thought through kneejerk laws, like asset forfeiture and three strike life sentences - how can you have justice with a system like this?
It is, although a lot of the vested interests and poor incentives problem is not arising at that level. Almost everyone working in the system is trying to do a good job with too few resources, but incentives shape behavior and cause problems even when people are trying to do that.
A basic problem with democracies is that they overcriminalize because elected people want to look like they are doing something about crime. We've known this for centuries, going back to Jeremy Bentham, but there is still very little effort done against it.
The Smarter Sentencing Act, which is something both democrats and republicans on the Judiciary Committee have agreed would be a good thing, and would save probably thousands or tens-of-thousands of man-years of prison time, has been approved by the committee for years and still languishes without getting a vote on the floor.
What can technology do? The first thing is that it can help people petition Congress, for one thing--email your Congressman and (Where your voice can do more good) your state legislatures. America leads the developed world in criminals--ask them to make it a real priority to change that, and provide concrete steps such as funding more alternatives to imprisonment, supporting the Smarter Sentencing Act and other reasonable sentencing reductions, and asking them to put together a plan to reduce recidivism and the collateral civil consequences of conviction such as lack of employability.
The second thing is technology--more accurately, science--can inform the jury. No jury should sit without learning about the reliability and lack of reliability of eyewitness testimony.