Yes, it's hard to compare the Legion, which is a whole military machine, against a phalanx, which is an infantry unit.

However the Roman military machine is superior (I'd say) to the Greek one