JFK violated the Monroe Doctrine and in doing so paved the way for the communist turmoil in Latin and South America.
We paid a heavy price by allowing Castro to stay. Part of the strategy should have been Castro goes and the missiles in Italy and Turkey stay.
1) We had already, before the crisis, decided to pull the Jupiters.
2) In 1960-61, half the CIA thought Castro was a good guy. On the one hand, JFK got railroaded by the CIA into an invasion that Ike had strongly stipulated that US forces would not be involved no matter what; then JFK indicated he would support the invasion; then he changed his mind after the attempt to assassinate Castro failed.
The time to get rid of Castro was immediately after he took power, but no one could get a consensus then that he was a bad guy. Nothing short of a full US invasion after that would have worked, and Kennedy (rightly) was concerned that a US invasion there would have resulted in the Soviets taking W. Berlin. That was absolutely correct, and we couldn’t have done a thing about it. So the tradeoff was Cuba for Berlin, which in the long run worked much more to our advantage.
................