Could you be attacking uphill? I have found this makes a huge difference. I always use my phalanxes in guard mode but find that whatever phalanx is defending a hill, or even a slight grade, usually wins. I've used phalangatai deuteroi and pantodopai to decimate far more elite phanalanxes using this tactic.

TM