It also claimed universal authority over the entire world based on the binding and loosing scripture.
And sought to exercise that authority through the various local monarchs. In England the high point, or low point depending on your point of view, might have been when Henry II was forced to do penance.
As the Church became more corrupt, it acted increasingly as another political parasite, and like a louse, was plucked on occasion from the body politic. There were many honest and often effective reform movements, and always many good people inside and outside the church.
People’s faith in something that didn’t help them in this life was probably a great consolation to many people who needed consolation. Objectively, the top heavy medieval church structure was not needed to gain that consolation and was, eventually, excised.
In any case,the pope was never the emperor but the Chief Justice of Europe, while the kings et al served as sheriffs. As for lice, it was always the papacy that served to unite Christendom against the Turks by taxing Europe to fund the Crusades. We know that the money for indulgences did go to rebuild St. Peters. But it also went into a Crusaders fund. Unfortunately, after Pius II, after Constantinople fell to the Turk, no pope even bothered to try to rouse Europe. Luther showed no alarm. He was willing to let the Turk take over and scourge Europe. Even as the Turk was banging at the gates of Vienna, he was only happy that the Emperor was distracted.