the dervishes were fighting with swords,cavalry,spears,archers and old rifles since the briotish and french navies blockaded them and they defeated the british 4 times it's only that they weren't fully supported with airpower by turks and germans that they lost. So even the greatest of armies can be defeated by spears and swords
britain had a hard time conquering nomads so they supported the christians against the muslims
I highly disagree. Not the historical facts that the British Empire was beaten, but that medieval military technology played a huge role in it.
In a lot of cases the British Empire lost because it was highly underestimating it's foes strenght and underestimating an enemy is always a really,
really bad idea. Also hostile climate and local geography played hugely into the hands of the natives. Diseases, lack of supplies, unusual heat and the issue that generals didn't know where to best march through unknown landscape were in my opinion far more decisive than any medieval weapon technology.
Of course you can ambush and charge a vastly technologically superior army and in close combat you might win but battles don't win wars. Eventually, the Europeans overcame their initial problems, marched to the capital of the natives and occupied their lands. The Europeans always "won" the war, if we draw an abstract paralell to EU4. Which is the reason why almost all of sub-Saharan Africa eventually fell under European control.
If at all, fighting with swords, cavalry, spears and old rifles doomed those nations into military defeat rather than allowing them to repel the European threats. Imagine this same army in the Ethiopian mountains equipped with modern canons, rifles and military tactics .... what would be possible?