Just to add to my previous 2 cents:
I think that the “lessons to be learned from the US” is a bit of an over US-centric notion. Innefectiveness of attacking entrenched positions was not something the Euro’s should absolutely have picked up on.
Remember that he soldiers in the American civil-war were not regular, professional soldiers.
The natural reaction for people, who are shot at, is to take cover.
What happened, most times, during the American civil-war was that the first line, when it encountered too much oppositional fire, would hunker down at the first opportunity. usually a ditch or a fence or a wall, anything that gives some sense of protection.
From that position they would just exchange fire and it would be extremely difficult to get the attack going again.
Successive lines would sooner join the hunkered down men as renew the attack by advancing further than them.
The professional German and French soldiers from the wars of 1864, 1866, Mexico, Italy, Crimea and 1870-71 were a different kettle of fish.
They could be relied on to keep the attack going. At Gravelotte-St Privat, for example, the Prussian Guard suffered horrendous losses, but they sustained their attack and overcame the entrenched French.
It wasn’t until the Franco-Prussian war that machine guns were only beginning to make an impression. But they weren’t belt-fed yet and the effect wasn’t better than a well-coordinated rifle volley.
What the generals had learned was that if the attack could be sustained, it was possible to win. Hence Germany’s emphasis on obedience to orders and French talk of the “Furia Francese”.
By the time WWI arrived machine guns and artillery had evolved even further, but there hadn’t been that much war-experience with them between 1871 and 1914.
Besides, not all Euro’s were the same. The Germans were not as keen on these assaults as the French and British, plus they were the ones who started the trenches in the first place and were much, much better at how to build them.