Certainly my child. Topography is key. A phalanx is virtually invincible in narrow terrain. Flanking with more mobile troops is necessary to be victorious.
On an open field of battle, it's wise engage with heavy infantry from the front and flank/harass with light cavalry.
If their formation breaks they're typically less equip to skirmish. 