When did infantrymen of Western armies cease to be issued of swords as sidearms (and backup weapons), on a general basis?
PS, Swords were rather common stuff for infantrymen even in 19th century (the briquets). See, for instance: this website. I recently saw (at the NYC Frick Collection) a video titled "Watteau Soldiers", whose pictures are easy to find. That artist clearly depicted (ordinary private) infantrymen carrying both bayonets and swords hanging from their belts.
When the shovel became standard issue for infantry between World Wars 1 and 2.
I don't believe swords were ever "standard issue" for infantry but certainly starting with Napoleon bayonets were. German infantry did so well against all other counterparts in North Africa because Erwin Rommel made sure all soldiers had a shovel, knew how to use it and in fact did use it. Russian interior ministry forces are famous for their use of shovels and the US military is infamous for having great shovels but failing to use them.