It is such a complex issue and as with anything like this, it is a multitude of scenarios that could have played out better with hindsight but I would say this, whilst our foreign policy definitely needs to be looked at in terms of how closely we align ourselves with US foreign policy by comparison to the first part of this century, it is a smokescreen to suggest that our foreign policy is to blame for any of this. Whilst I accept it is one strand of the issue, these people would attack if we withdrew from everywhere and kept quiet because they wish to change how we live to what they would like. We are between a rock and a hard place at times but it doesn't help when we are also being hypocritical in selling arms and security training to Saudi Arabia and then enabling them to go into Yemen who we are then having to help via foreign aid.
The lesson to be learned regarding the likes of Saddam Hussein in Iraq and Gaddafi in Libya is that if you are going to intervene, which is in itself, with hindsight, maybe something we shouldn't have done, then you have to have a clear and workable plan for immediate governance in that country. The moment you leave a power vacuum then you are doomed to years of internal fighting once you have left and the country then is left in a worse place in many aspects than when you went in.
The problem that we have now with regimes that are killing/oppressing its own people is that we are now holding back much more and it is looked at as politically convenient or hypocritical from us to not get involved and viewed by outsiders as though we aren't getting involved because there is nothing in it for us. The picking and choosing of which countries to get involved in of previous generations and administrations is now coming back to haunt us but like I say, it is very complex because you can't go in and solve every issue, in every country and in some circumstances you can't not go in.