Ok, well ill post first then, heres a few anti-phalanx tactics:

Phalanxes are a strong formation which is top heavy, meaning that one side is strong and the other side is weak. The side with long spears pointing at you is the heavy and generally most threatening side. So what you want to do is hit the weaker side with an overpowering unit which will also break the stronger side. To do this pin the stronger side with a weaker unit of your army (its going to take a few casualties anyway so make it a weaker and less important unit in your army) Pin them with the weaker unit first, then hit their rear with the stronger unit, and they will hopefully switch to swords and get massacred, or they may use pikes and still lose, oh well. The morale will still drop due to many things, outnumbered, flanked, etc.

I may post more later on, but thats all for now