you need to turn off phalanx and run them into formation in front of the bridge, they will usually stop short but when they have stopped give them a second order, click and drag, to stand in front of the bridge, then when they stop again activate phalanx. Pausing helps alot.

Now, I've never done this with a germanic phalanx but what works for one factions phalanx troops should work for another faction.