To be honest, most muskets and rifles of the time weren't that inaccurate, most of the time it is user error in where the shot goes as well people don't really want to shoot each other. Most people aim higher or lower than the men that they are supposed to be aiming, and during target practice, people usually hit targets regularly. But in battle, if you have two lines of regulars fighting, then it's only a quarter of the accuracy because of that reason. Yes, against untrained troops a few of the rank will fall and everyone will route, but they see a wall of smoke and the lack of enemies and decided its best to run when they aren't visible. Also entrenchments have always been used, even in the field of battle. During this age of revolution, they were really put into full potential. Waterloo, the different riots in Paris, Yorktown, Borodino. Most of the time, the two armies would entrench and fight over several days while marching troops across an open field littered with bodies of previous waves of men while being fired upon. Sometimes they would meet the enemy out in the open if both armies sent out men at the same time or sometimes as a quick counterattack if their line won the skirmish.