Verse 16 is crucial in this connection. Moses tells the judges (note that that is already democracy – a leader who shares responsibility with others), “Hear out your fellow man”.
Everyone has their dignity, their opinions, their history. Nothing can be imposed on anyone else. The judge has to listen to them, as does every leader.
So what if the other person is younger (or older) than you, an orphan, a widow – indeed any category of woman – or a stranger. Listening to the people is to give them respect. In its own way it is to acknowledge that they are each entitled to a vote.
Whatever Athens taught the world about democracy, Israel was an even earlier pioneer. Its principle is that in a democracy, no-one is a nobody.