There is a stark difference between playing on a public server and playing in a line battle. Using cover is a better way to fight, which is why modern armies do not stand in lines and take turns firing at each other. Battling in lines is a matter of old-school honour, and probably organization and discipline as well. If you want to use lines in a public server, you need a good leader at the head of the line, who does not simply bring everyone up to where the enemy is, halt, and fire at will until the path is clear to move up further. You should still use cover, especially walls that you can get your whole line behind, and increase your spacing from zero to maybe two or three meters between each soldier, because while the enemy is not going to stand shoulder-to-shoulder, out in the open, for you and your line.
If anybody wants to learn how to really lead lines in pub servers, I would recommend talking to William of the 63e, he's darn good at it.
As for your suggestion, it would indeed be really neat if officers could control some line markers that appear on the ground or that people could lock into and hold formation, but when you look at regiments attending organized line battles, people train to do that anyway without overt in-game UI guidance. Buffs for being in formation would also be neat, but you could also gather a musician and a flag-bearer to travel with your line to get buffs.
It would be cool, yes, and would probably make a great game mode in itself, but it's not really necessary. If you're worried about lines in pub servers, the officers are just going to need to get better at leading in the world of pub servers and not just act like they know what they're doing.