My first thought is to say that the reaction to these leaks would not have prevented him from winning re-election in '64. It was a more publically prudish time, when such details were not discussed in public, so I would expect most of the backlash to be against those leaking the details. And, it was also a more chauvinistic time, when lots of other prominent men of power had dalliances with mistresses (I’m looking at you, LBJ), so perhaps the reaction to his infidelity would be one of resigned acceptance, instead of outrage. Moreover, JFK would likely have gone on the offensive, denying the “allegations” and blaming the “smears” on his political opponents; in the face of this opposition, JFK may have rallied his supporters to even greater loyalty.
But, right about the time of JFK’s death, there was a sex scandal raging in the UK (the Profumo affiar), which led to the ouster of the Prime Minister’s Secretary of State for War and led to a lot of hand wringing over the influence of the Soviets. It does make one wonder about Kennedy’s reaction to the details, and whether he ever considered himself at risk of similar exposure. Judging by the fallout in Britain, it is reasonable to believe that JFK would have been seriously tarnished by a public review of his private behavior.
All of which means that, if there were indeed powerful factions within the government who wanted to topple the Kennedy administration, there would have been more effective means than a public assassination. Character assassination may have worked. So, too, would have a more clandestine death (poison, perhaps), which could then have been blamed on an unexpected health crisis.
In other words, the logic of a government sponsored public shooting of the President was never sound, *even if *you believe that the government had a reason to want to kill the President.