You're quite right, the fact is that cavalry was obsolete,
cavalry was used only on the eastern front, where the trenches were not continuous and in Palestine, cavalry officers
were moved in artillery, in non-technical roles.
The last cavalry charge took place in Russia, in Isbuscenskij, during WW2. when it was made by the Italian of the Savoia Cavalleria regiment, with sabers and grenades
en.wikipedia.org/wiki/Charge_o…