I think that the Arabian & Saharan desert nomad cavalry were also among the most effective cavalry, though somewhat underrated. In contrast to the Central Asian steppe nomads who were usually light cavalry archers, the Arabian/Saharan desert nomads were usually light cavalry lancers (though they later became light cavalry archers in medieval times), thus they lacked the range of cavalry archers. However, the desert nomad cavalry made up for it with their greater mobility, due to being unarmoured or extremely lightly-armoured and also due to apparently having faster horses (the ancestors of the modern Arabian horse now used across the world).I know The French Foreign Legion is famous for fighting against such incredible odds that victory or defeat are practically after thoughts.The late 19th century abounds with such examples, typically speaking as long as a european army was in a decent defensive position with the ability to concentrate its fire and an abundance of ammunition it was all but impossible to overwhelm. On the other hand if the "native" army could catch the Europeans on the march, or isolate each section of the army one by one it would almost always sweep over them. British experiences in the Zulu war especially show plenty of examples of this.
A common pattern of colonial warfare was in fact to send out a well equiped armed column with lots of fire-power, machineguns for preference (the Brits really cottoned on to their Swedish Nordenfelt machineguns prior to the advent of the Maxim), and then wait for the natives to turn up. It usually worked.
As for entrenched positions, it's been claimed that what the British did at Roarke's Drift during the Zulu war was commonplace along the North West Frontier in India. It was politics that ensured it got such massive attention following upon Isandlwhana as it did.
It supposedly occurred in 1882 when 300 Legionaries escorting a surveying team near the Morocco/Algeria border met 8,000 Arab cavalry. After 7 hours of fighting in a blinding sandstorm the Arabs retreat, having suffered 2,000 casualties. Legionnaire losses where 42 killed and 31 wounded. Typically the commander survived despite 9 gunshot wounds and 7 sword cuts. Cool story, but is it true? I'm sure the wounds were various levels of superficial .The Italian troops in the italo turk war were outfought by superb Arab cavalry. The effectiveness of the Arabian/Saharan light cavalry lancers can be seen in the Punic Wars where Hannibal's Numidian Berber cavalry outflanked the Roman cavalry, and the Arab Muslim conquests where Khalid ibn al-Walid's Rashidun Arab cavalry outflanked both the Sassanid light cavalry archers and the Sassanid & Byzantine Cataphracts/Knights. Early organized Arab mounted forces under the Rashidun caliphate comprised a light cavalry armed with lance and sword. Its main role was to attack the enemy flanks and rear.
The Battle of Talas in 751

Later Mamluks were trained as cavalry soldiers. Mamluks were to follow the dictates of al-furusiyya, a code of conduct that included values like courage and generosity but also doctrine of cavalry tactics, horsemanship, archery and treatment of wounds.