I would think that given enough cavalry support, the Phalanx could've done very well against the Romans. The Phalanx was very susceptible to uneven terrain though, so surely it would depend on whether it was a flat field or some rocky region, as the Romans were very flexible troops. Given the weak cavalry the Romans had, surely the Macedonian ones could rout their counterparts and be able to support the flanks of the Phalanx better than it was in history. This is, however, somewhat wishful thinking, but since we're going all out, I'd say that the Phalanx could definitely defeat the Roman Maniple if they were fighting in their prime.