A coup where the Junta rules America was not going to happen. This is not to say that there were no risk. A local commander could take aggressive action that would lead to war especially if there was vagueness in the orders. For example, think Patton division size recon unit in Sicily. The army was not in direct contact with the Cubans, so any action like this would likely be by the Air Force or Navy. A ship commander deciding that he was "under attack" by a sub leading to war or LeMay or a lower level air commander taking what he called defensive action.
Now if Kennedy does freeze up and refuses to issues orders, the military would issue orders until he regained his composure. I had to sit through the reading of standing unit orders once, and there is a line in there that goes something like, "In case of foreign attack and an inability to receive orders from above, the highest ranking officer on the scene is authorized to take all actions need to defend America." So for example, if Kennedy has a nervous breakdown, and say the Cubans shoot at an USA spy plane, the LeMay takes whatever action he sees as "best". And some people would see this as a "coup"
I personally believe a lot of the "coup" talk was political BS designed to make JFK look better. If one looks at both the bay of pigs and the cuban missile crisis, JFK really choked. He cancelled the air support for the bay of pigs, making the USA look weak. No competent general ever recommend doing an amphibious assault in 1960's without air support. This weakness leads to Cuban Missile crisis. Now at some point, Kennedy performance improves, but overall, he handled Cuba poorly. The coup talk was political BS to distract attention from JFK weak foreign performance.