The problem is that between about 1850 and 1918, there was an ongoing discussion between proponents of "Elan" and those supporting "Firepower"
The problem is that both have their glorious examples of being right and the other guy being completely wrong.
While Pickett fails to break the line at Gettysburg we find regiments steamrolling over troops behind a wall as if it was a mere formality.
Colonial defeats were good example of "Elan" trumping firepower at Ishandlwana and Little Big Horn.
Petain may have concluded a superb defense at Verdun, but he was considered much too timid to lead an attack and was replaced by Nivelle who brimmed with confidence that he could "Break the Boche" in their trenches.
While everyone can cite the Somme, Passchendale or even Gallipoli as proof that it was all in vain and that you needed to "adapt your tactics" in other fronts battles often were pretty decisive like Caporetto, or the Brusilov offensive.
The Americans clearly understood that taking the initiative was part of the way to win battles and that an aggressive move at the right time will get better results than a masterful tenacious defense.
The mistake was to mistake taking the initiative with being reckless. The Americans believed that a bit of "Sturm und drang" would put the living fear in those exhausted Germans.
While this may work on a local level and unnerve a battalion or a company in a rough spot, the general German defensive system was extremely resilient and could afford to have troops lose their bottle in that the attacker was going to exhaust himself no matter what.
We see a similar problem in WWII, the Germans seem to win every tactical battle without effort, but are then completely crushed on the strategic level.
The Americans were not wrong to promote aggression in their troops, but their officers didn't quite know how to channel this in the right way. A lesson the French and British learned by spilling a lot of blood and while they had superb teachers, the Americans would have to pay a similar tribute to learn the final lesson.