That has always been my thought. In medieval times the Church ruled with an iron hand, kings and queens bowed down to the Church. The Pope ruled much of what is now Italy and had his own army. Priests taught the people what to believe and if a person questioned these teaching he / she could be in big trouble. If a person disagreed with these teachings he / she WOULD be in big trouble. Then along comes this organization talking about free thought and electing leaders. Of course the Church tried to stamp it out and still opposes it to this day.
"The Church" did not rule with an iron hand. Kings routinely got into fights with "the Church" and very often spanked "the Church". The resolution of the Investiture Controversy, for example, was that the Pope appointed all Bishops in German lands--but only from lists provided by the King of the Germans (aka the Emperor). Likewise, France and "the Church" were repeatedly fighting. In Italy, the Pope was just one squabbling warlord among many, and he often found himself helpless before the power of the King of France. Once the Reconquista had succeeded, the King of Spain also pretty much played kick-ball with "the Church" if it suited him. The pope of Rome might have had his own army, but it wasn't a big or powerful army, by any stretch of the imagination. Regarding what "priests taught the people", most plain parish priests were as uneducated (and poor) as were the people they served. This is why there were so many attempts to reform ecclesiastic administration. There were very rich and powerful clerics--they were in the major cities and hob-nobbed with the royalty.
The idea that "the Church" ran everything is a silly lie, so silly that it would be better called a "cartoon" than a "lie". This lie was invented by the leaders of the Reformation. The "histories" written in the 1600s and 1700s were not histories at all, not by any rational standard. They were propaganda pieces, very often for the purpose of stirring up war fever or supporting economic protectionism over free trade. Thus, since England had been non-Catholic since the days of Henry, English-language works invented this stupid old lie of "the Church" as some kind of all-powerful thing that ruled over everyone with an iron fist. Truth be told, the "liberators" from "the Church" were at least as iron-fisted. The Reformation in England actually reduced leisure time for the ordinary person. "The Church" insisted that people not only be at Mass for holidays but that they refrain from heavy labor and enjoy themselves during ecclesiastical feasts. Well, that did NOT sit well with the rich landowners and guildmasters who were behind the English Reformation (at least)--didn't know that? The Reformation in England was very often led by the elites against the wishes of "the people". However, that was whitewashed over, later, so as to drum up war fever against Catholic Spain and Catholic France.
As for Freemasonry "coming along", by the time Freemasonry "came along" in Britain with its radical ideas, "the Church" had not been a force in Britain for more than a century. There was next to no Catholic Church to oppose it in the land of its birth. Its transportation to the Continent was opposed usually as much as Freemasons were also socialists or proto-socialists or, even worse, sought to impose official atheism (as in the French Revolution).