Africa never had jails, physical punishment or death penalty before being invaded by nomads Arabs from north of the Sahel desert, which violently weakened them in their ancestral cultures and subsequently allowed them to be colonized.
In the old days (and I remember them for having lived through them in some parts of Africa, barely touched by colonization), the moral codes were set in stone and genetically transmitted: you didn’t lie, cheat, steal, kill or envy. And you pulled your weight. Reminds you of anything or anyone?
Whenever one was caught breaching the codes by the village, he (most of the times, it was a “he”) would be tied overnight to a tree to “think it over”. The following day, all the village men would gather, free him and surround him and they, who had known him since infancy, would reminisce together all the wonderful qualities he ever displayed, going back to his childhood and why his transgression(s) were completely out of character for him, whom the village held in such high esteem until then, and could only have been a transient, slipping episode in his life, so worthy of consideration otherwise.
The session might have taken hours since everyone had special memories of all the good deeds the man had done in his life until then and for which he had never received appropriate credit which would have prevented him from slipping down that slippery slope.
The men then made amend to HIM for having failed to openly recognize and acknowledge his contribution to the village or clan’s life and… the poor schlemiel was actually completely healed in one such session. It truly was a collective act of contrition after which the village erupted in songs and dances lasting long into the night. Some kind of “the bad sheep had come home” moment (Jesus never invented anything).
Most village elders had gone through it at least once in their life. It rendered them fair, humble and yet authoritative: they had fallen once, been restored and never fallen again. They were trustworthy for having proved themselves after one slip.
Not everyone became an elder… old didn’t make you an elder. Proving your character did.