have to disagree about the phalanxes in RTW. Of course they were powerful, but they were fairly easy to counter with pila-throwing sword inf, even from the front. The way to deal with pikes in a bottleneck was to make sure your legionaries had thrown all their pila, take guard mode off and then to give them a move order behind the pikemen. You would suffer some casualties but the result would be your swords were close enough to the pikes to be able to strike at them. This would result in a victory for your swords more often than not. A sword unit should be able to beat a pike unit of the same cost bracket if used right (there are some exceptions), especially as the AI didn't know any of the tricks for reforming phalanx formation. Anyway, shooting pikes from the back with missiles or swarming them with cav were other good ways of countering them.
@OP, R2 does not have the best representation of unit depth/weight I find as unit collision is still pretty dodgy. RTW and M2 handled this area far better and it made for much better melee engagements.