Any institution that is based on exclusion is destined to fail. Religions and dictatorships are based on the absence of freedom and information. And there will always be a struggle to maintain their defenses. Especially in this information age.
North Korea and China are examples of governments that keep their citizens in check by controlling the flow of information. And they are succeeding. But in the short run only. Eventually inside and outside forces will break through and they will become normalized and able to participate in the larger world.
The same principle applies to religions. They operate on the principle of ignorance and exclusion. Sometimes the range of thinking is limited by an early learning environment that cripples the mind. In other case its outside forces like the government or society that keeps thoughts “in line” with official doctrine.
But history has shown that religions begin to fail when the pressure to conform is removed. Then people will start exploring alternatives lines of thinking and secular usually prevails. Religions and dictatorships depend on the absence of information. Secular thought thrives on information and contradiction. It thrives on choice.
When you remove the obstacles to thought, a secular world is the natural result.