MUHAYMIDA, Syria—In Islamic State’s former eastern Syrian stronghold, the Islamic Republic of Iran is parlaying its military and economic might into a lasting foothold.

On the heels of an Iranian military intervention that has helped bring President Bashar al-Assad to the edge of victory in Syria’s eight-year-long war, Tehran is moving to cement its long-term influence in Syria by cultivating goodwill and winning converts to the Shiite Muslim sect.

To...