phalanx

The correct ques, which Greeks thought about a lot was opposite–“How do you even protect this formation?” The answer lied in being very selective about terrain, actively deploying lighter troops & cavaliers to protect, have competent generals & rank who can stop them from panicking.

As anyone can see, these are highly immobile and aren’t solid blocks which will remain standing even if you chip at one end – they come falling down immediately. You can’t turn them either, only two occasions are known when they were turned.

The “Companion Cavalry” was a key element of Alex’s force that people often neglect. On the Indian terrain in the Panjab the phalanx seems to have fared poorly & in more direct combat the Macedonians were pulped by the elephant corps. Then there are mobile archers. The Roman testudo was well protected in the flanks but still could be harried by the Iranian archers playing the long game.