If society wants to build a fair system of judges and laws, it has to give the power to those who are most at risk of being negatively affected by the rules and policies of society.
The minority population of any country should form the majority of the jury on legal cases. For it is the minorities of that society who will be able to best judge the fairness of the world that it is they live in. When everyone is treated fairly, justice will also be fair and just in turn.
As for the judge her/himself, the best judge is one who can express compassion, and who has lived through and overcome the tribulations called to court by the afflicted. Let the rehabilitated judge the addicted. The reformed thieves judge the theft.
The majority of our prison population is occupied by the poor or mentally ill. Is poverty a crime? And should the mentally ill be given jail time instead of treatment?
All systems require refinement over time, and no system is perfect, but things at this point can be a lot better. We need a vision of a better legal system, where we elect and promote systems that will further more compassionate and effective solutions in this world. Then individuals can carry this vision ahead and push policies that will better our society.