Yes, you can alter depth:

formation 1, 1, 2, 2, 8, square, phalanx

Where 8 is the depth.

It is unfortunate that the AI can't handle wider formations properly. The wider depth is more realistic/representative. One of the problems with movement speed is the lateral effect. You can move much more rapidly across the width of the field than would have been possible in real life. This magnifies flanking by an order of magnitude.