While I agree with much of what you wrote, I think there is a future problem caused by the why the coalitions are formed now. Daesh represents a common enemy, so it is easier to strike up a coalition to defend against it. However, once that common enemy goes away, Iraq and Syria will be left with several heavily armed groups which now have battlefield experience and no record of having worked in harmony among themselves previously except to defeat Daesh.
In such an environment, one would hope for central governments to provide for a common future, except that there is too much blood on Assad's hands and he's too Alawite to play well with the other groups in Syria, and Iraq's government is more or less Iran's poodle. The outside countries are willing to fight to the last Syrian and Iraqi, and they will not suddenly stop supporting their proxies.
The only avenue I see for those two countries are representative democracies with a separation of religion and state, but the tribal and the Islamic parasites running the mosques will never allow it, they have too much to lose...and it is so much fun telling everyone else how to live, without that, the parasites themselves see no reason to live.
In Syria's case there are only 2 paths to peace: Assad steps down or he wipes out the opposition. Sadly it seems as if it will head towards the second option, especially if Syria turns into a proxy war between US and Russia (domestic politics may inadvertently push Trump towards that in an attempt to distance himself from claims of being too cozy with Russia).
But my master's thesis touched on some of this: reintegration or disarmament of militias is one of the hardest parts of counterinsurgency operations. The simplest step is to integrate those willing to do so into the state military/security apparatus (although if Assad stays in power I don't see many FSA/SDF members lining up), and provide job training/education/reintegration support services to the rest. Ignore them and they might turn into insurgents themselves. For democratic nations they can turn into political parties (but only if properly disarmed, otherwise you might end up with something like Sinn Fein/IRA). The political transition can be easier in fledgling democracies, but an emphasis should be put on coalitions and not sectarian/factionalized parties.
Unfortunately, I think many states in the Middle East need theocratic democracies, as this seems to be the best way to hold down extremism without needing dictatorships/strong-arm leaders. The trick is actually allowing minority groups actual, effective representation and participation in the government. It's either that or a set up like Turkey (pre-fake coup), but Middle Eastern militaries don't have the history that they do in Turkey and are probably more likely to end in coup/dictatorship.