I'm going to say that it was my silent moral support that made the difference there. Shevek23's actual advice may have played some small part too- I'm a generous soul.
Anyway, I think the key to Africa in the nineteenth century is to understand that colonialism was going to pick up in pace from previous centuries. This was due to a myriad of reasons- the sheer mounting damage of the transatlantic trade, the technological advancements made in Europe that made colonialism possible, the way that post-Enlightenment Europe saw serious changes to the way westerners understood race and civilisation... and that's not even touching the complexities of Sahelian politics.
What was not inevitable was a full Scramble For Africa of the pace and fury that our timeline saw. I tend to think that the inciting factor there was the Franco-Prussian War. After their defeat the French stopped seeing their African possessions as expensive baubles and began seeing Africa as a chance to recover their national dignity and perhaps rebuild their strength for a second confrontation with Germany.
Once the French began expanding at a faster race, that really led to the idea that colonial possessions in Africa were the mark of national vitality and that drives a lot of people. Look at the way Germany's colonial possessions were largely driven by middle class patriot/pirates who thought Bismarck wasn't paying sufficient attention to Germany's interests (!).
So I think to maximise the success of the Sahelian states you need to
i. Slow the race for colonies. To keep the Sokoto as healthy as possible, that means keeping the UK and France from focusing their attention on the region. Perhaps look for a different end to the Napoleonic wars? Not a full victory because that will guarantee the British throw themselves into expansion. But perhaps look at Lycaeon Pictus' Dead Skunk timeline for a scenario where following an alt-hundred days the Second Empire keeps most of the 1792 borders (France is number one on the continent) but the UK is also clearly the leader of the winning coalition. This would have the advantage of an early divergence- it keeps the major colonial powers focused on crises in Europe and the Mediterranean, rather than sub-Saharan Africa.
ii. You need to find a way to stabilse the Sahel states. I'm no expert, but the early nineteenth century saw plenty of territory change hands between local polities- that weakened them in the face of the Europeans. If any one local state becomes too powerful it probably won't have much incentive to modernise until it's too late- you need a few small, strong state with decent trade networks and urban centres that can in time become part of the global trade network.
iii. When Europe does enter the region- in force, that is, beyond the existing coastal factories and corporate concessions- you need the local states to be weak enough that they're not seen as a threat that has to be destroyed, but strong enough that no one wants to go to the bother of an expensive conquest. Jonathan Edelstein has many of the African polities spend much of the nineteenth century as akin to the Raj's "Princely States," until their autonomy swings back to full independence.
iv. Most troublesome of all, and here I admit absolutely no knowledge of local cultures, you need to work out how to get rulers to even think in terms of what we'd call "modernisation." On this site we often refer to nineteenth century industrialisation as "pulling a Meiji," as if the Japanese reformers simply made a decision to catch up with the West. In fact, it was never so simple. Many of the Meiji reformers began their careers as traditionalists fighting to keep Japan isolated. If you look at China, Thailand, the Boer states, Korea, the Ottomans, Ethiopia, Russia- modernisation/westernisation/industrialisation was an incredibly dangerous and complicated process. Many of the so-called reactionaries were perfectly right about the risk it would pose to traditional communities, cultures and the authority of the state. There was never a single model for success. Also, and I think this doesn't get enough attention, like any other kind of revolution it's the point at which reform is closest to victory that it's the most dangerous- civil war and foreign intervention become dramatically more likely.
So on top of the hardly simple task of working out how the Sokoto Caliphate's economy is going to get to the point that industrialisation is possible, you need to work our what cultural changes will see its rulers, its imams, its aristocrats, its merchants and its peasants begin to change their traditional ways of life.