The weak and sick ideologically are always overcome by the mighty, usually tyrannical; it is a fact of life.
As 'muslims' have abandoned the Qur'an for fairy-tale hadith, worship of past devoid of wisdom forefathers, become a 'nation' of ritual performers instead of ambassadors of humanity bringing about a just social and economic system, then it is obvious they will be kicked from pillar to post.
As for the Ottoman and Mughal empires, they had their time, became the 'sick man of the world' and lost everything; their dignity long gone before the fall.
The Shah of Iran was a gold and diamond peacock and got what he worked for.