There were certainly a lot of people with a lot of reasons to hate JFK.
Anti-Catholic bigots, the secret societies you mentioned, the Mafia, the CIA itself, not to mention geopolitical rivals like Cuba and the literal USSR.
It’s quite possible someone put a hit on him, and others had an interest in covering it up for their own reasons, whether they had something to do with it or not. The conspiracy theories are not totally insane.
But also, the lone wolf theory also makes sense. America has always been full of crackpots willing to take shots at Presidents for their own insane and personal reasons. The ‘60s were a wild time. Did someone just snap? Maybe.
Who really shot Kennedy? Who knows?