OK, here is a graphical representation showing my suggestion r.e. tactical unit placement.
The base location of units would be determined by some function (Side A of map, somewhere near the middle, etc.) that the game uses. This base location would not always be the same, to reflect fog of war and such. The game would do it's best to place the formation into the squares available, shifting units out of impassible terrain, which would of course disrupt the formation a bit, as it should.
I'm envisioning a Button below the 9 unit ovals on the interface, which would display the current formation pick (Say, Wedge). Clicking on this button would open up the chooser, allowing you to select a different formation.
Prioritizing unit order could be implemented fairly easily without formations. The unit order would determine which units are protected (placed towards the back) and which ones are closer to the front of the player's position/initial placement. I.E. if you had 7 units, units 1-3 would be towards the back, and units 4-7 would be towards the front.
The only wild card on this would be additional city defenders. These could be placed based on their use (bowmen added to the rear, militia placed at the front, next to the stack formation).
Note that formation options do not automatically place unit #2 in the back, for example, if there are a lot of units. So players would need to be mindful of each unit's placement in the formation order (i.e. if you have a 7 unit stack in the wedge formation, position #2 might not be the best place for a bowman, #3 or 4 might be better). The alternative to this is to assign different formation assignments based on stack size, but I think that as long as it is clear where each unit is placed based on it's priority, players will pick up on this fairly quickly.