Part of this discussion points out the myth behind the "deep state conspiracy". One has to study enough of the history to get at a balanced view.
Starting with the National Security Act of 1947, CIA was financed initially by Wall Street, and the top officials recruited from OSS and Yale's Skull and Bones. There arose a close relationship with Big Oil because oil figured as paramount in the national security equation. At the same time, George Kennan's white paper for the JCS defined Cold War strategy to contain Stalin's totalitarianism, and translated into communications with the public to raise public opinion against Communism as an ideology.
On the one hand, CIA was so compartmentalized in fear of counterintelligence threats from NKVD and KGB moles that it was possible for a mid-level careerist assigned in the Bay of Pigs "Operation Zapata" to mastermind the Kennedy assassination, but in Public Opinion this grew into conspiracy theories that included upper echelon such as Allen Dulles, Richard Helms, Frank Wisner, James Jesus Angleton -- and extending to GHW Bush and LBJ. The Mastermind himself understood this and backtracked his plot to implicate or frame LBJ while using Bush as an "accessory after the fact" in setting up the cover-up and the Warren Commission. LBJ was guided into establishing the Warren Commission as part of all of it.
In other words, CIA crippled itself with the compartmentalization, Angleton's clinical paranoia, and Frank Wisner's mental breakdown -- the latter having knowledge of the Mastermind's involvement in CIA's efforts to help Hollywood with Richard Condon's novel turned into the Manchurian Candidate movie. They weren't going to investigate further because it would lay bare their preparation of 2,000 US Marines for infiltration projects (sending Oswald to the Monterey Language School, for instance, and then prepping him to slip into Russia from Finland). And Congress didn't put the kibosh on the Hollywood propaganda film projects until the Church Committee hearings of the mid-1970s.
Beginning with Truman, CIA had too much influence on the White House, and Truman was an easy mark. So they could orchestrate Mossadegh's overthrow and later the election of Ngo Dinh Diem in Vietnam during Eisenhower's term (take a look at Graham Greene's "A Quiet American" and the 2001 film version). Eisenhower was wary about pursuing war in Vietnam -- as was JFK. LBJ came under the influence of Curtis LeMay and hawks in the JCS, still hoping to extricate us after inserting 200,000 American troops. But historians have always referred to Vietnam as "CIA's war".
There was intelligence about oil in the South China Sea, while the Brits had fought World War I partly to keep Suez open for oil shipments, and after the Balfour Declarations, this extended to the Iran initiative. Oil was Hitler's Achilles Heel on his Eastern Front: attempting to grab the Baku oil reserves while simultaneously pursuing his disastrous campaign to capture Stalingrad.
People want to blame CIA for distortions in foreign policy over oil, but they also wanted to "Get Their Kicks on Route 66" and motor to national parks for summer vacations.
In the end, a large part of the public was ignorant and naive, so they ascribed Iran's historical actions as originating with Islam and conflict with the Christian West. The American public -- for lack of historical understanding is dumber than shit, and Cold War efforts to suppress information as a concern for national security didn't help. So while there was a need to keep CIA operations in the early Cold War under wraps, it worked against public opinion informing a more rational foreign policy.
Like the inscription on the Langley VA building's wall says "The Truth Shall Set You Free."