1. Muhammad's example
After gaining a large number of followers, Muhammad returned to Mecca to take over the city and cleanse it from pagan idols --> to me this sounds like an offensive technique rather than a defensive one.
2. The rule of force implemented by the Ottoman empire (which was an Islamic organization at core)
I'm not even going to mention which methods have been applied when conquering the countries from South East Europe , North Africa and Arabia.
1) This has no bearing on apostasy. The people in Mecca were not Muslims. Nevertheless you are also simplifying what was a a state of war at the time and the invasion and conquest of Mecca was a result of the breaking of the treaty of Hudaybiyyah. The destruction of the idols was an act of war, it was also used to signify an important aspect for the prophet, that his god was the true path.
To expand, the pagan gods of Mecca were considered to be the protectors of the city, the resulting conquest of Mecca and destruction of the idols was to signify that they do not exist that this muslim god was superior and for the Quraysh especially to accept that their gods could no longer protect them. It was this point that brought - along with the clemency - converted many former enemies like Abu Sufyan to Islam. It was a brilliant stroke of political manoeuvring.
2) This has nothing to do with apostasy. The Ottomans for example began their conquests 7 centuries after the death of the prophet. The Ottomans were conquering countries because they believed they were former Muslims and deserved death? No.
The results and actions of any Islamic state (of which there were many) are political actions that should be seen in the same light as any empire or kingdom that has existed. The need to expand, subjugate and conquer are motives used by men who seek power, glory and riches. The brutality of Christian colonial empires are not a reflection of Christianity. They are a reflection of the adherents of that religion at that particular time. It is the same thing.
Like any empire at the time they were fought wars and subjugated people. So was Timur in his conquests. Or Babur etc. In contrast, the expansion of Islam into East Africa and South East Asia were peaceful and through trade. The spread of Islam was at times peaceful and at times completely brutal. These are not a result of a religious ideal but human nature.
A good book to read if you ever want to learn about this stuff is A History of Islamic Societies by Ira. M. Lapidus.