I think you're right. By the first WW cavalry was mostly obsolete. For that matter infantry was moatly ineffective for most of that war as they were driven underground by the machine gun and artillery fire.
because the thinkers of the time hadn't developed tactics for it (creeping barrage, shock troops, bypassing strongpoints etc). it's worth noting that a large proportion of early WW1 assaults were successful but were crucially not followed up troops tended to capture a trench line and then wait until they were counter-attacked rather than pushing on and letting the troops following behind consolidate and mop-up any pockets of resistance. Took the Allies 4 years to learn how to do it properly