I agree that that explains why so many popes have been Italian, but I don’t think it entirely explains why every pope between 1523 and 1978 was Italian.
Prior to 1523 there had been popes from France, Germany, Spain, Portugal, England, and the Netherlands (I am using modern country names and also excluding earlier popes from when the Roman/Byzantine empires were still extant). Travel and communication were surely more difficult before 1523 than after. Admittedly, many of the French popes were from the period when the papacy was based in France.
Also, people did travel and communicate throughout Europe. For example, the Polish-Lithuanian Commonwealth elected a number of kings from outside of Poland-Lithuania, including France, Hungary, Sweden, and Germany. The royal houses of Europe also used to arrange marriages across the entire continent. Indeed, the royal houses of Europe sometimes actually exported a branch of a royal dynasty to a fairly remote corner of the continent which lacked a suitable indigenous royal family, e.g. as was the case in Romania and Greece.
Although the Roman curia was of course dominated by Italians for much of its history, there were always cardinals from all over the world (until recently, most from Europe) to be found in Rome.
And why did it take until 1978 for a non-Italian to be elected? One cannot blame transport and communications beyond, say, the middle of the 19th century.
Of course, there are reasons, and the simple practical fact of the papacy being based in Rome is one of them, but I am also sure that cultural and political factors come into it too.