It's worth remembering that the Russian assaults in Bakhmut are very much NOT the same as WWI infantry-wave "going over the top" assaults. Instead, they're continual small-infantry-squad assaults. If not immediately repelled or destroyed, they dig in, establish a new point for small squads to assault from. The Soviets called this tactic "gnawing". The Ukranian have been countering with mortar fire and artillery - but there's a delay between a 'gnawing' attack being called in and artillery coming down (chain of command) so mortars are the most effective countermeasure. But, here's the thing, the Ukranian are short on 82mm mortar ammo.
It seems the West has been somewhat 'caught out' by the demands of this war. I'd expect all the planning was high-tech West vs low-tech Russian assaults (e.g. Neutron bomb to counter waves of Soviet tanks). Instead, we're supplying one side of a grinding war.
Bright side: the West seems to have figured this out - and it might not be too late.