It depends on what you are doing with your phalanx. To create a solid wall of pikes on the battlefield any phalanx is sufficient, even machimoi or pantodapoi (should be minimum 4 or 5 of them in a line). They will crush any non-phalanx enemy that will attack them.

In a fight phalanx vs. phalanx the better one will win. That is, if this formation is attacked by pezhetairoi it will be routed. Even if it is attacked by about the same number of levy phalanx with only one of better quality.

A serious problem, allready mentioned, for low-end phalanx is moral. I have seen AI deuteroi phalanxes routing with full strength during a chain route. That is a problem of the AI having all units attack at maximum speed, what means that the slow phalanx often is the last to arrive on the field and will be isolated as soon as the first units start routing.

So, I would say that for the human player levy phalanx is usually enough. The AI needs better phalanx units because of its poor handeling of them. In return the player needs better pikemen as well when facing AI armies with hig-end phalanxes.