Also, we have at least some records of what these guys said and wrote — and anything that was big enough to lead the whole Church astray would have had to have survived in recorded form; a proclamation lost to history would not have an ongoing effect. We can literally look at those periods of history and see that no major doctrinal disputes were settled by a disputed Pope. (Heck, the Pope defining dogma by himself is a fairly recent development, and has thus far only been used to elevate the status of beliefs most Catholics already held; historically the way to settle a big dispute or introduce a major reform was to call a council.)
Sure,a false Pope might have issued day-to-day orders or expressed opinions that were not protected by the Holy Spirit … but legitimate Popes do that too. The butterfly effect is not some special danger in this case. Plenty of undisputed Popes have been unwise or wrong or outright wicked; the Holy Spirit only guarantees that they will not lead the whole Church into error, and we can look and see that they have not.