Answer: According to the wisdom of Kabbalah and the Torah, there were no prisons. Based on the upper system of governance, it is forbidden to deprive a person of freedom when each one of us is simply controlled!
If you open the book of Torah, you will see that the only prison that existed belonged to Pharaoh. People were thrown into it and remained there for as long as the lord wished.
Yet, Kabbalah says that there is one Lord for us all and everyone is completely equal before Him, both the Pharaoh and the mere mortals. Therefore, it is impossible for one person to judge another.
That is, the judges who in ancient times were among the people ascribed to everyone what spiritual corrections they needed to make because people made mistakes because they did not understand this.
Question: At that time, were there cities of refuge for offenders?
Answer: Cities of refuge are something different. If a person committed such a crime that he needed to be isolated from society until he atoned for his wrongdoing, he was sent to the city of refuge where he lived and worked. He was released from there after six years.
In addition, according to the Torah, there is a commandment to repay all debts in the seventh year. In the fiftieth year, everything is cancelled and goes back to the previous owner, for example: land, home, etc.
That is, everything is arranged so that a person would not feel attached to something in his life or obliged to someone. This would create a psychological layer for him that everything is temporary, everything is suspended in the air, there is nothing absolute: the land is not mine, the house is not mine. There is no attachment to corporeality. Everything depends only on the way he, at every moment, establishes this between himself and the upper force.
From the Kabbalah Lesson in Russian 8/19/18