The problem is the tribal culture- every valley has its own clan, and theyve been raiding each other and their neighbours since probaly 1000ad.
How do you stop that? You'd probably have to get some central authority with enough power and wealth to be able to police every valley.
If it's a foreign power, how do you keep the various clans uniting against it?
And if it's a native power, where do they get the money to impose order.
My guess is the best bet would be a Muslim power, possibly the Mughals or Persians. Rich heartland, not 'too' foreign. But why do they care about imposing justice and rule of law, when it costs so much money and so many lives.
Second best would be the British Empire. They'd try hard to impose the rule of law - but they are very foreign - and infidels, to boot.
Third best would be a charismatic religious figure who converts Afghanistan to a form of Islam that's dead set against tribalism, raiding your neighbours, etc. Like that would get converts there!
In any case, even if you manage to get the place peaceful, how the heck do you get it prosperous? What can Afghanistan produce that's worth anything? The land isnt very fertile. If you did have someone making world class widgets, the the transportation infrastructure sucks. All thosevalleys, you know.
So any hypothetical product has to be veryl l valuable per unit weight.
Opium? 'Persian' rugs?
But even so, how do you prevent someone else, with better trading links, from producing the same stuff cheaper?
Maybe that hypothetical sect of Islam allows images, and that kind of carpet becomes all the rage in Europe, but any persian weavers who try to cash in on the trend get a fatwa pronounced against them?
Edit. Oh dear. This is in AFTER1900. Oh my.
Nope. Not going to happen. Just not. Sorry.