than the rulers. When it came down to it, it was about power rather than theology, or, more accurately, employing theology to acquire power. Martin Luther was deemed a heretic because he opposed the Church's sale of indulgences - basically, paying your way into heaven. So he argued that the only way a person could get to Heaven was through faith alone (sola fides) and not through "works," that is, by donating money to the Church. But the Church didn't care so much about the theology underlying sola fides, but that if his argument caught on, the Church wouldn't be able to collect as much money. Henry VIII couldn't get the Pope to grant him a divorce from Catherine of Aragon, so he declared that the Church of England was no longer governed by the Roman Pope. But Henry didn't want the English church to change its theology - he also thought Luther was a heretic - he just wanted to do something the Pope wouldn't allow. The devastating Thirty Years War in the 17th century started out when Ferdinand II declared that everyone in what was then the Holy Roman Empire (most of central Europe) would be required to convert to Catholicism notwithstanding the Treaty of Augsburg; but this quickly devolved into a struggle for power and not over religion among the various states within the HRE.
Throughout history religion has been used as an excuse for whichever ruler controlled or was controlled by religious leaders to acquire more power or territory. Even the more recent Troubles in Ireland didn't happen because the Catholics in Eire and the Protestants in Ulster wanted to convert each other; it was because the Irish opposed the presence of a British "colony" in Ulster. With Brexit about to take Ulster out of the EU, that's going to flare up again.
Nevertheless, I doubt that religion in any or all of its forms will ever be eliminated, or that the desire of secular leaders to acquire power will ever go away either - even if religion did not exist.