With their ability to ward off cavalry attacks and steamroll practically any other type of opposition in melee, it seems quite strange to me that there would be this massive gap between the decline of the Greek phalanx and the rise of the pike formation as popularized by the Swiss.
What would be the reason for this hiatus given that the exploits of Alexander the Great would have been quite well known amongst the educated elites of the Europe and Near East?
I would like to point out that organized pike formations such as the Scottish schiltron were present at a much earlier date than you suggest in your question: The circular schiltron is seen at 1298's Battle of Falkirk, and a more flexible rectangular schiltron is seen at 1314's Battle of Bannockburn. The famous Swiss polearm formations show up around this period as well, at the battle of Morgarten. Sauce
It's worth noting that formations like these were intensely vulnerable to archers, as seen during the battle of Neville's Cross, which is a large part of why they aren't seen during the early middle ages. They also require a large deal of training to move as a unit, something most early medieval states would have struggled to afford. The Swiss were one of the first who could, which is why they became so successful (detailed a bit further in this previous thread)
Edit: automod says to ping the author of the previous thread (u/CroatInAKilt) author of the answering comment in the earlier thread, which is u/Taliesintroll, in case they have more to add.
Double edit: I'm sorry for pinging so many people.