It's the guard mode that's ausing your men to get slaughtered. You see, while it is good to keep it on against non-phalanx units, it is useless against other phalangites. So if you want to face other phalangites, turn it off. Other factors that may affect your men's performance is your general and the terrain you're fighting on. I try to engage my enemy with my Makedonian armies only on open terrains or if the terrain in rough, I try to provoke them into attacing ME, by besieging a city of theirs for example.