In retrospect, it is easy to see where mistakes were made in Vietnam and the futility of that conflict. In the context of those times, however, the Cold War including the containment of commie expansion was the highest political priority. Dems politicians were vulnerable to suggestions that they were being soft on dealing with the Communists. As a result, the political reality for JFK in running for re-election in 1964 was that he had no real option but to maintain the US presence in Vietnam. LBJ was caught in the same trap. There was no real political option to say whoops we made a mistake and let the commies overrun S. Vietnam. It was a trap. As more and more resources and lives were devoted to the cause, it became all the more politically impossible to admit a miscalculation had been made. It took over a decade and the façade of a peace treaty before that could happen. As s result, it's highly unlikely JFK would have done anything much differently from LBJ. But Oswald made what JFK might have done no longer relevant. So thank him if you want to believe JFK would somehow have avoided that disaster.
As cited in the original post - the discussion about the overthrow of Diem - JFK made a series of comittments to Vietnam that LBJ inherited and was forced to deal with. JFK may have not originally gotten the US into that swamp in the technical sense of being the first to send in troops et cetera; but his repeated statements about the dangers that a loss of the South posed to US interests and security (compounded by, as mentioned above, his support for the removal of Diem) made the possibility of simply reversing course, i.e., withdrawing troops, nonexistent.
One can argue that those statements were simply for domestic consumption, to fight off the charge of "losing Vietnam" the way Democrats earlier had to respond to the claim of "losing China", but they had real consequences for LBJ. JFK may have figured a way out of his rhetorical trap; but LBJ didn't have that option or ability. Or didn't think he did. As LBJ himself said in several calls he felt trapped, that it was a mess but he didn't know how to get out.
In any case, the claim that JFK was murdered because, in part, he had decided by November of 1963 to withdraw from Vietnam is simply not, in my view, supported by the facts. RFK said no decision had been made; McNamara said no such decision had been made; Rusk said no such decision had been made; and the Pentagon Papers show no such decision had been made.