I think most of the friction between the West and the Middle East is geo-political and is the direct result of the relative scarcity of oil and its importance in driving economic growth. Look at who is financing these Islamist organizations. Saudi and Qatari elites who have vested interests in keeping American influence in the region in check but don't have the traditional military power to do so on their own (plus, they need enough plausible deniability to keep selling oil to the West and direct fighting tends to result in outcomes like what happened to Sadaam so direct military conflicts aren't preferable anyway.) Religion is just a convenient recruitment tool because going to poor people (relative to oil elites) and saying we need you to fight America so that we can maintain leverage of our oil reserves isn't all that effective in the same vein that U.S. officials telling the population that we need U.S. soldiers to die in deserts for oil doesn't poll all that well (so we use nationalism/patriotism/democracy as propaganda). Two different sides of the same coin. You take the scarcity of energy away and suddenly all of these geo-political games seem a lot less necessary.
Also, notice that you never really see any Qatari terrorists. Qatari is the richest country in the world with little over 100k per capita (twice that of the U.S.). People aren't really receptive of the whole martyrdom thing when life is pretty good here on earth.
All that to say that if you solve scarcity, you will be a long ways into solving those sorts of problems. There might still be mental ill people and depressed people and people that derive joy from killing. Ending scarcity won't solve those issues, they are problems for medical science. But scarcity is biggest root cause of many of the problems the world faces and so solving it is the biggest thing you can do to make lives better on Earth.