I'm curious if giving infantry the pikewall ability would be a better representation of a square than what we currently have. There's nothing special about forming a square, its just four groups of line infantry, with each line facing a different direction, with bayonets fixed and front rank forward. You could do the sameout forming a square if the enemy was going to only charge from a single direction.
It'd be a more realistic way of setting up a square, you wouldn't be making 20 individual squares. Just make them unable to move, and more vulnerable to fire due to their tight formation, with a bonus in melee. The unit ability is already in the game even. Of course the BAI wouldn't use it right anyway which defeats the thought I suppose.