The reason we have this view of WW1 is that after WW1 in the 20s many normal people in the 20s started writing about the horrors of war and that combined with the strong anti-war sentiment lead to the view we have now. Claiming that generals like Haig was an incompetent butcher. The whole 'lions led by donkeys' myth.
However non of that is actually true. Or not anymore true then in any other war. For example, there is stark contrast to right after the war, where Haig was considered a hero and most soldiers in their post-WW1 writing liked him.
In terms of causality rates, WW1 isn't that special, high intensity combat in modern war isn't that different, from Crimea to WW2. If you have warfare at that level, even if you are successful, you have massive causalities. The Somme for example wasn't that different from the Normandy campaign in WW2.
These generals had to deal with armies of literally million of people and they didn't even have wireless communications. How do you command 500 men in a coordinated attack without communication?
The Americans had to go threw the same learning curve as the others, but they started right away fighting against an enemy that was mostly veterans. Americans could have learned better, but it also has to be said that Pershing by command from the president was not allowed to fully integrate his troupes with that of the French army.
> I assume that this was because many generals were trained on Napoleonic-Era tactics
This is complete and utter nonsense. Please stop spreading these myths. This all just Post-WW1 anti-war politics propaganda.
> against machine guns and semiauto rifles
This is again a myth. Semiauto rifles practically didn't exist in the beginning of WW1. And machine guns had existed for a while and were not that effective.
The big killer on the battle field is the fast shooting artillery. Massive innovations in that had happened in the 30 years before WW1.