Historically that was how it was done. When the Epirotes under Pyrrhos faced the Romans it was an even fight Phalanx vs Legion because Pyrrhos was a talented general who knew how to shield his flanks. And in each case it was the deployment of the Elephants that broke the Romans stubborn will to fight. When as at Pydna and Cynoscephalai (sp) the Phalanx did not shield its flank it got crushed by the more mobile Romans flowing around its flanks.

So in EB as in history, ware your flanks.