Hi, I'm new but have been studying exactly this subject for the past few months.
A lot of hay has been made over the Phalanx's difficulties when dealing with the Legion's flexibility and with the problems of rough ground. I think that largely, this is only accurate if you deal with the later Phalanx. Specifically, the evidence indicates that the Greeks developed an over-dependence on their phalanx, leading to specializations that ultimately made them less capable when compared against a capable commander. The sarissa (spears) were lengthened even further from the days of Alexander and the reliance on bulldozer tactics became common. There were understandable reasons for this (when Phalanx went against Phalanx, mobility was never needed, but larger spears could be decisive), but the end result was that once a battle-field innovation (the roman legions) was thrown into the equation, the highly specialized Phalanx was ill equipped.
On the other hand, Alexander's army was designed to fight more than the Phalanx and it was extremely good at it. Many of the drawbacks typically ascribed to the Phalanx were well mitigated by Alexander's combined-arms strategy. In fact, it was this combined strategy that allowed he and his father to defeat the phalanx-dependent armies of Greece early on.
Argument: Alexander's Phalanx was inflexible and un-maneuverable
I don't see how someone could look at (say) the battles of Issus and Guagamela (aka Arbella) and still believe this. Alexander's men were extremely well drilled on various formations that allowed them to combat all sorts of maneuvers. For example, the phalanx is able to quickly form open ranks when Darius attacks with scythe chariots. This formation created wide gaps in the ranks which the horses (choosing between spear-walls and wide-open channels) diverted through. The chariots were then picked off from the sides. Additionally, the phalanx was able to quickly form into a wedge or an inverted wedge to either drive home an attack, or to absorb a wedge and envelop its enemy. The phalanx was trained to be able to wheel on a corner, so as to out-flank a body that had been held in place by light infantry, or that had outflanked another element of the phalanx.
Simply put, Alexander's phalanx was well trained and veteran in its ability to deal with battle-field conditions.
Argument: Alexander's Phalanx could not prevail on rough terrain
While it is theoretically true that a phalanx is less effective in rough terrain, it is not completely useless. A veteran army can still prevail as seen by the victories at Granicus and Issus. In the former, Alexander makes a river crossing and in the latter, the phalanx fights uphill over broken ground. The point is that the Phalanx is not meant to be the decisive force, which is a lesson that is later forgotten (or others might insist was never learned) by the Greek successors. Instead, the Phalanx was the keystone to a combined-arms strategy.
Argument: Alexander's Phalanx was easily flanked and at that point could be defeated
Again, I think this argument stems from a misreading of history- ascribing traits to Alexander's army which were displayed much later when the Greeks drop their dependence on combined arms. In reality, Alexander well understood the danger of a flanking maneuver, and so often drilled his army to deal with it.
For example, at Guagamella (Arbella) Alexander is far, far outnumbered and at danger of a flanking maneuver. Yet he positions troops in reserve on either flank. Additionally, the echeloned staggering of troops makes it very difficult (and dangerous) to turn the flank on Alexander's army. The act of flanking the lead element in turn exposes your own flank to the next element of units. In cases of a breakthrough, Alexander had been known to plug the gap temporarily with his light reserves (who would lose in a protracted fight) and then- depending on the situation- wheel a phalanx element in to out-flank the breakthrough or alternatively bring his calvary to bear.
With this in mind, I think the Romans were hard pressed to resist Alexander's tender advances had he chosen to make Italy his next conquest- certainly during the early formative years around 330 - 300 BC. Perhaps had the Romans been able to raise legions comparable to their armies of 40 to 80 years later, Alexander would have had a more substantive fight on his hands. (Though again, I don't think it is a given that he would not adapt to defeat these as well. He simply did not have the same weaknesses as the Phalanx-reliant armies of later Greece.)
Thanks,
-Dev