Well, I would have to disagree with your statement that Popes or the Church have reversed themselves on doctrine. There has been development or unfolding of doctrine, but not reversal.
Also, no intelligent Catholic believes that all popes go to Heaven. Dante depicts numerous popes and bishops in hell, and it was an early saying that “the floor of Hell is paved with the skulls of bishops.”
The distinction is that although some popes were sinners, had illegitimate children, and so forth, they never officially promulgated false doctrine.
Two times in history they came close: when Arian bishop was made pope at the urging of the Emperor—but he then reversed himself and never promulgated Arian doctrine. And when the Spiritual Franciscans argued against the immortality of the soul (as distinguished from the resurrection of the body), and the pope was about to promulgate their heresy when a mission from the University of Paris dissuaded him from doing it.
Sure, the popes often are mistaken on prudential matters and in their personal lives. But not on the basic teachings of the faith, as Jesus promised to Peter.
That, I am afraid, is an historical fact.