So how could the regime make itself safer from another rebellion? Get rid of as many as possible of the poorer Sunnis, and particularly those who lived in the cities.
The present situation presents a once-in-a-lifetime opportunity to do just that, because more than half of the pre-war population of 23 million are now out of their homes: 6 million as refugees abroad and another 6 million internally displaced. They are almost all Sunnis, and the Assad regime sees them as "bad" Sunnis, so here's what he is going to do.
Syria's new Law No. 10 requires property-owners in parts of the country devastated by the war to produce their ownership documents within 30 days. If they don't, they will have no further claim to their home or the land it once stood on. It sounds straightforward, but here's the trick.
The devastated areas where most buildings were damaged or destroyed are, of course, those that fell into the hands of the rebels and were smashed up by government bombs and shell-fire. Assad's regime assumes (probably correctly) that most of the people in those areas, mainly on the outskirts of the big cities, backed the rebels.
Many of those people are now refugees outside the country, and most of the rest are internally displaced persons. Their documents may have been destroyed, or they may never had deeds (if they lived in informal settlements). In either case they will be very reluctant to come home and put themselves in the hands of the regime, so they lose their land.
And then, the regime thinks, they will never come home at all - which is the point of the whole exercise. When these areas are eventually rebuilt, the homes will go to people who backed the regime, or at least stayed neutral: "Good" Sunnis and the minorities.
Meanwhile, the war will go on for a while here and there at a lower pace, but the Kurdish-controlled areas will probably soon be back under government control. Rather than wait to be betrayed by the Americans (who will not protect them from Turkey in the long run), the Kurds will make a deal with Assad that gives them an autonomous Kurdish regional government and protects them from Erdogan's anger.
Idlib, the last opposition-held area, will take longer. The province's population has doubled to 2 million, and a great many of the newcomers are hard-line Islamists who were sent there after the negotiated surrenders in Aleppo, Eastern Ghouta or Daraa in the past eighteen months.
Assad doesn't actually want them back, and the Turks (whose troops are already in Idlib province) might fight to protect them. He may just leave them there, safely quarantined, until an opportunity arises to get rid of them. In the meantime he is re-shaping the population to guarantee the regime's long-term future.
The cities may be a bit smaller, but they will be regime-friendly. The country will still have a Sunni majority, but a less overwhelming one, and the most hostile elements will be living in exile. It is demographic engineering on a very large scale, and nobody can stop it.
To the victor go the spoils.