If you are going to make ridiculous comparisons, at least try to get the historical narrative correct. The Cuban Missile Crisis did not cause the Bay of Pigs invasion. If anything, it was the other way around. The Bay of Pigs fiasco occurred a year before and likely had a hand in convincing Castro to host Soviet nuclear weapons on Cuban soil.
ETA - you are correct that the war in Ukraine would not have happened under a Trump presidency. Russia still would have invaded, but it would have been over rather quickly, as support from the United States would have been negligible.