When playing as the Romans I never use infantry to flank. I stand my ground and have a group or two of cavalry go around back, wait until they are nearly breaking and smash them apart. (very costly some times though)