I agree with you that there are no people today who are prone from error. However, when the muslims elect someone to be a Khalifah - they choose the most pious among them. I.e. After the passing away of God's final Messenger (peace be upon him) - the most pious among the people was Abu Bakr, after him Umar, then Uthman and then Ali.
Now we know that they were really just, they loved, hoped, and feared Allaah a great deal. This is the characteristic one needs when they look for a leader since the person is scared of being disobedient to God because they know that they will be raised back infront of God to be judged on their actions and deeds performed in this life. Yet they also hope for reward from Allaah in the hereafter if they are a just ruler. This is emphasised in many Prophetic sayings, especially in regard to being just.
The Messenger of Allaah said: "I counsel you to have Taqwaa [God consciessness] of Allaah and to hear and obey, even if an Abyssinian slave were to command you. For, verily, whoever amongst you lives (to grown old), he will see many differences. So stick to my Sunnah [path] and the Sunnah of the rightly guided khaleefahs. Cling tightly onto it and hold onto it with your molar teeth. And beware of newly invented matters. For, indeed, every newly invented matter is an innovation, and every innovation is a thing that leads astray, and everything that leads astray is in the Hellfire."
[Authentically recorded in Abu Dawud]
And if we look into the Islamic history - you can see the justice of the companions of God's final Messenger, since they had the best example to follow - Muhammad, the servant and final Messenger of God Almighty.
So we can have an example to follow, since these people were humans just like us. They weren't divine in any way, yet they were aware of God and knew that we are responsible for our actions and deeds. They were successful, in this life and the next.
Regards.
I will ask again, show me one of these Islamic societies that flourished and was run justly under anyone who was appointed by men. Again I will say, only God can appoint the one who will rightfully institute his law, everyone else is a scam. If you can show me one perfect civilization with a perfect political infrastructure, then I will believe you. Until then I will wait on Jesus to come back and straighten everyone up.
There may be examples given to follow but to date no one has followed them exact. If they did they would be sinless. If these "Kalifahs" are elected to rule with Gods word and judge on behalf of God (because law is the judge of things on earth) then they must be free of all sin, an imperfect being could not do this. Take a look at Iran, you will see what happens to "Kalifahs" when they are put into power.