So is it safe to say that the Taliban has basically won at this point? I'm not saying this as taking their side necessarily but from an objective viewpoint, the Kabul government are, pardon my French, completely screwed.
Industrial revolution which we missed. Ottomans were largely agricultural. If an industrial revolution is going to happen you got have a capitalist revolution in the empire. Biggest problem we had was that the Greeks and Armenians owned all the wealth due to trade which allowed them to educate their population by sending them overseas. Greeks and Armenians did not have to worry about fighting wars as us Turks had to fight all the wars that the empire was in. Every Muslim man was conscripted to fight has been like this for centuries regardless of which Islamic Empire it was.
Japan was able to industrialise because it had a united society. The Japanese had no other ethnic groups to worry about while the Ottomans were plagued with it.
Japanese got rid of their traditional classes which made modernisation easier while the Ottomans still had clashes with the traditional class. Ottomans clashes between the Modern class and the Tradition class would last until the empire collapsed.
Ottoman Pasha and ruler of Egypt Muhammed Ali of Egypt brutally massacred the Mamluks the traditional rulers of Egypt. Pretty bloody to be honest.
Modern vs Traditional always ends up bloody.
Funniest thing is that one of the Ottoman ministers at one point actually said that making non-Muslims exempt from military service was a mistake, mainly because it meant that their numbers could freely increase while Turks were dying and because it meant they had no stake in survival of the state. Being given the option to serve on the front actually could've helped with making them more patriotic towards the empire. And this was centuries before the cracks started to show IIRC.
Agriculture was also a big one, it was under-developed in the Ottoman Empire, which meant that there was little population growth since there wasn't enough to support, say, 60-80 million unlike modern Turkey. And of course, the disinterest in education, which wasn't as bad as some people portray but it also was contained to mostly the upper classes and didn't invest nearly enough in the vital sciences as needed.
One of the reasons why scientific progress went so quickly in Western states (and in the modern world) was because the opportunities for exercising your brain for even the lowest peasants were widespread. In any given population, there are potential geniuses, but you need to invest in order to make sure that the geniuses can enlist their full potential. Also why progress moved so quickly as more people gained access to schools and universities.