IMO islamistic terror or "islamism" at all has its roots in the lack of education. In general as well in what the islamic world HAD actually achieved in the past : not "militarily" or on grounds of "ruling power" but on science and culture (btw : when did the islamic world started its decline and when became this an avalanche ?).
To prevent the rise of islamism in modern times ... maybe keep the Ottoman Empire neutral - all or most over the Great War, won by the CP (however you might 'arrange' that).
With the "Young Turks" (alike Atatürk) keeping control of most of the region they start a huge develpment campaign with all the oil at their hand in Mesopotamia, maybe also of Aserbaidschan (?), strongly supported by the germans (keen to get their share of the oil), who also start to "help" the Ottoman Empire to develop education, management, civil services, the whole administration along "prussian virtues". With it the/a middle class, as we understand it grows, in numbers as well as in influence, a middle class mostly interested in calm, slow, economic florishing.
The slow turning of a feudal, agrarian society into a civilian more urban (or to start with ... "townish") society.
And with its growing wealth it could become paramount for other country adjacent (Persia, Afghanistan, the turanian states/countries, that might exist now)
Such a development would IMO be the best way to avoid any growing ground for the islamism, we know today.