
I think that this is an overly simplistic view of human history. Religion has flaws and boons, and historically it had many social uses, which is why it persisted. It was a tool for social organization, for education, for economic activity, and for community cohesion. Of course this came with flaws, such as holy wars, coalescing of supreme power, and religious persecution. But it’s a mixed bag.
Religion is simply how pre-enlightenment cultures view the universe. From Aboriginal Dreamtime stories to Catholicism, it’s an extremely broad umbrella. And yes, it can be used as a tool for hierarchical organization and control. That can be good or bad. The primary engine of the distribution of goods and long distance trade in Mesopotamia was the temples. And across the world, religion and education (including writing) were usually very closely tied.