It's funny that the summary starts with "One of the cornerstones of any democracy is its judicial system". That's true of all forms of society/government; it is absolutely not limited to democracies. So why bring democracy into it - except that it's one of the holy words of our society, a word that stuns everyone into instant acquiescence and worship?
One can make a strong case that justice is particularly hard to come by in a democracy, as opposed to a monarchy or a true aristocracy. The distinguishing feature of real democracy is that the people as a whole wield supreme power. So a majority can carry out any act, no matter how illogical, unethical, or downright disgraceful. Such as the execution of Socrates, for instance. Or the decision to execute the admirals of the Athenian fleet after the battle of Arginusae - which was rescinded the following day, when the people changed their minds.
You can see a similar pattern in the USA, where many prosecutors are elected by the people. This leads them to pursue popularity at all costs - and, in a populous society where most electors will never get to meet the actual candidate, popularity is usually sought by lighting up the media with sensational news. How many miscarriages of justice have been perpetrated because a prosecutor wanted to make a name for himself? And of course the prosecutor is not held responsible, because his job is only to argue the case for conviction. If someone is wrongly found guilty, that is the fault of the defence, the jury, the judge, the police who made up evidence or concealed exonerating evidence... and anyway, it's all forgotten the next week.
Probably the best place to start constructing a good judicial system is with a genuine concern for justice. It has been well observed that, in any country that has a Ministry of Justice or something similar, justice itself will be conspicuous by its absence. (Just as any corporation that has an "ethics committee" has probably forgotten what the word "ethics" means). Honest people know what's right, but given enough bureaucracy and laws - assisted by thousands of career-minded functionaries - we get today's situation where any lawyer can tell you that the law has absolutely nothing whatsoever to do with justice.