The essential problem with Iraq and Syria is that they are not nations as we understand the term. Since their creation by the British and French after World War I -- no state called al-`Iraq or al-Suriya ever existed before -- these countries have been held together by some or another ruling elite and not by a shared sense of nationality. They are empires. The fudamental flaw in the logic of the interventionists was to suppose that an occupation and reconstruction of Iraq would follow the pattern of Germany or Japan after the Second World War. German and Japanese nationalism played a large role in the rise of the movements that started World War II; but while Saddam Hussein and Hafez Assad both professed to be pan-Arab nationalists, their regimes were essentially traditional, based on ethnic elites: Sunni Arab in Iraq, and Alawi in Syria. In this they resembled the Ottoman empire, the Mamluk empire, the Safavid empire, the Roman empire, and virtually every other empire in the region since the dawn of history. Only Egypt and the countries of the Maghrib appear to be exceptions, perhaps as a legacy of decades of French and British rule.
And, of course, Israel.
It should not have been a surprise that the alternative to tyranny in the Middle East is often chaos, as would-be successors to the regime seek to carve out smaller states of their own, if they cannot make a play for the empire as a whole. The history of the region is replete with examples of this pattern, beginning with the decline of the `Abbassid caliphate in the ninth century.
A second mistake, I think, is to allow terrorism to become a major focus of our foreign policy. Islamic terrorism is not, and cannot be, an existential threat to the United States or western civilization, the events of September 11, 2001 notwithstanding. Terrorists are criminals not soldiers, and the proper way to fight crime is police work not war. An army can respond to a terrorist attack only crudely, in ways likely to hurt innocent bystanders as much as the terrorists. Our pursuit of a "global war" has given these people attention and legitimacy, ascribing to them more importance than they deserve, and perhaps recruiting more people for their movements than we kill. It is counterproductive, and it saps American resources and lives that should be directed at real strategic concerns like the emergence of potential new superpowers in China and India.
The best thing we can do here is to let nature take its course, bloody though it be at times. The peoples of the region will work out their own modus vivendi, as they have throughout history.