They all stood to benefit from JFK’s removal and they all may have been involved to greater or lesser degree but only those at the very top of the clandestine government agencies could have organised not only the act itself but the aftermath. How would the mafia or Cuban exiles influence the complete botching of the autopsy etc?The Mafia definitely wanted him dead because of the way his brother was going after mob links to the unions after Joe Kennedy had promised them the earth. Ruby's mob links are a huge red flag.
At the same time, the CIA definitely wanted him dead and made huge efforts to cover it up - Dulles heading the Warren Commission and tampering with their investigation, the fact that the CIA officer who had recruited Oswald as an asset was liaison to the second investigation in the 70s and suppressed all evidence of CIA involvement.
Not to mention the Cuban exiles who blamed him for the failure of the Bay of Pigs invasion.
All three of those groups' interests align in Miami with the Cuban emigre organisations down there. And the Mafia had major interests in Cuba before Castro and links to CIA and Cuban groups down there. I can't see past all three of those groups being involved.