I imagine that at one time, the Greek pantheon wasn't consistently depicted. Most of the gods were probably the central figure in their own little religion. So, one region worships Zeus, another worships Poseidon, and still another worships Athena.
It makes sense that as people were gradually able to communicate with more distant communities, they started melding their religions.
Is this an accurate depiction of what happened?
Another really good, but really difficult question.
First, I want to get rid of your term "religion." I liked your word "cult" in the post title. A shared cult practice is one of the aspects that defined Greek identity. Greeks all over the Mediterranean, in different time periods, still largely shared the same cult practice: they prayed, sacrificed, poured out libations, put on festivals, separated sacred space, built altars and temples facing (largely) the same direction, and dedicated votives. The target of the cult changed from place to place, as you have observed, but they all did it much the same way. Some of this behavior was "learned" in that it crystallized with the help of shared myth-making and authoritative voices, but much of it stretches back into the dim beginnings of Hellas (or even into the Mycenaean period and beyond). I think it is important to establish that observation first. The cult of early Sparta was not radically different from the cult of, say, the island of Samos.
Now you are right that the individual personalities of the gods which would eventually become the "Pantheon" were not uniform. It is almost certain that some of them came from hyper-local environments, and indeed most of the Greek gods had schizophrenic identities drawn from a number of regions simultaneously. In most Greek cities, you could find different versions of a single god occupying the same space. These different aspects of the god were designated by epithets -- surnames for the god, essentially.
For instance, by the end of the Classical period at Athens, there were no less than three four major iterations of Athena inhabiting the Acropolis. First was Athena Polias, in her guise as protector of the city. She inhabited the Old Temple of Athena, which was burned by the Persians, and then in 406 BCE moved into the lovely but bizarre Erectheion building. There was also the famous Athena Parthenos, who inhabited the Parthenon in grand style (the image of Athena Polias was a very plain but very sacred human-shaped lump of wood called the xoanon). Athena Nike, was another, and standing over all was Athena Promachos, the Athena who stands with you in battle. Her huge statue towered above the city.
One of the ways the Greeks combined and, as you say, melded local traditions of god identity was through myth. The myths were already circulating and becoming entangled before Homer. With the arrival of the oral poets and their centuries-long circuit of the Greek world, the process accelerated. Homer's epics are famous, but less known are the so-called "Homeric Hymns." These poems tended to canonize the major myths surrounding some of the gods. Hesiod, writing in the 8th-7th century BCE, made great strides in consolidating and canonizing Greek myth with his Theogony and Works and Days, the former an account of the creation of the world and the latter a sort of almanac. Greece had no professional theologians: the poets served that role.
What most are familiar with as the standard Greek body of divine identity and myth was starting to solidify by the end of the 7th century. Zeus is the boss and hurls the thunderbolt. Hera is queen, and she is vindictive; but she is also the go-to for marriage and childbirth. Ares does war. Poseidon rules the sea, but also earthquakes and horses. Demeter makes the wheat grow. Aphrodite, sex. Et cetera. Within these basic identities are a series of myths and aspects, and there is where you find the local.
We can tell by the name of Zeus that he is, in fact, much older than Greek. Linguistically, he is the Germanic *Tiwaz, the Sanskrit Dyāuh, the Roman Iove. He is "Indo-European," belonging to a time before the peoples parted ways and began their separate European wanderings.
Hera seems to have gotten cult exclusively in the Peloponnese, at first. From there she was exported to Samos. But she gets cult almost nowhere else in the Greek world, and that's a little strange. She seems to have been very localized to the Peloponnese, in the earliest times. Her name seems originally to have been a title, the feminine alternative of the world which gives us "hero." It might have functioned in a similar way as the title potnia "powerful." And speaking of potnia: Artemis is best known as the young, virgin huntress, but at Ephesos she is a many-breasted fertility goddess. This aspect is almost certainly "local" to Ephesos, or else comes from Near Eastern religion (some compare her to the Assyrio-Phoenician Potnia Theron "Queen of Beasts").
Demeter (Dāmātēr) has the word for mother in her name, but the Dā- part is enigmatic. I have argued elsewhere that her cult is a little different from the others (she is at Eleusis, and is the star of the Athenian Thesmophoria) and might even be a lone surviving example of a Goddess from before the Greeks arrived in Greece. The other gods have humorous, wacky stories attached to them, but there is nothing funny about Demeter. She is wrathful, scary, from a darker and more desperate time in the Balkans. Her worship involves cthonic elements, and she is very much tied to the earth and the things below (as opposed to the other Olympians, who dwell in and are concerned with things in the air, in the sunlight). I might suggest that her associations with the earth and the below are earlier than her daughter's unfortunate one-way trip down with Hades. And she might have brought Poseidon with her to the Greeks: his name breaks down to Poteidāon, "husband of Dā." The two are worshiped together in Arkadia.
I've never heard a compelling argument for where Apollo's name originates, but a couple of his aspects (plagues and arrows) are probably borrowed from Phoenician Resheph. His divination and oracles also probably belong to that region, ultimately. Aphrodite is almost certainly the Greek version of the Phoenician goddess Astarte, who was "Queen of Heaven." Aphrodite has an epithet "Kythereia" which most assume to be from her house at Kythera, but in fact might instead point to the Ugaritic god of craftsmen, Kothar. That would explain Aphrodite's union to Hephaestos, then.
Athena (A-thā-ā) is more tricky. The name doesn't seem Greek at all. Hermes is such a confusion that I gave up trying to include him here.
This answer did not spring from my head fully formed, like Athena from the head of Zeus. I have a sort of composite file of notes from teaching discussion sections of Greek myth multiple times. These are three of the big ones I used at various points; there are dozens, hundreds more of course:
Burkert, W. 1991. Greek Religion. (this book is thick, but amazing. Some of the things Burkertt has to say will blow your mind. Look here for Demeter-related speculations).
Ogden, D. ed. 2007. A Companion to Greek Religion. Blackwell. (edited volume of individual articles. See especially Noegel's "Greek Religion and the Ancient Near East.")
Mikalson, J. 2009. Ancient Greek Religion. Wiley. (he is very Athenocentric but still good; and he's recent, meaning comprehensive bibliography).
I'm not aware of any scholarship that traces all the way back to the beginning of the pantheon, which would have been solidly in pre-history. One of the things that we can say is that the pantheon pre-dates "Greeks" living in "Greece" by a significant amount of time. The Greek Pantheon, like the Germanic Pantheon and some elements oft he Hindu Pantheon, seems to be a descendant of/heavily influenced by the Proto-Indo-European Pantheon. Proto-Indo European peoples spread all across south Western Europe and Much of Central Asia. As this happened, Indo European culture and language became dominant, wiping out most of cultures and languages that existed previously. Celtic, German, Greek, Farsi, and Hindi are all examples of Indo-European languages.
These people brought their culture with them in their migrations - including a pantheon of gods. This can be re-constructed by comparing the "roles" and names of deities, and you find parallels among all the descendants of PIE culture. For example, the original name of Zeus was Zeu Pater, or "Sky Father," which is parallel to not just Jupiter (also "sky father"), but also Dyaus Piter from the Verdic Pantheon in India.
So for the most part, from what we can tell, this pantheon came to Greece per-composed of gods from the PIE pantheon. Obviously this Pantheon diverged among all of its inheritors quite significantly, and local influence from per-existing culture is certainly possible.
Source:
de Gruyter, Wlater. Indo-European and the Indo-Europeans: A Reconstruction and Historical Analysis of a Proto-Language and Proto-Culture. Part I: The Text. 1995.