1. If anything should encourage modesty in U.S. foreign relations, the ability of Fidel Castro to survive nearly six decades as the ruler of Cuba should be it. We tried killing him, we supported a (brief) insurgency, we tried starving him. Nothing worked, except old age. This is a tiny island nation 90 miles from our shores. If we couldn't force our will there, we should be realistic about our ability to assert our will in, say, the Middle East.
2. Likewise, if anything should encourage modesty about U.S. intentions in the world, it's this: Fidel Castro was a rotten dictator who replaced ... a rotten dictator. Fulgencio Batista took power through a coup, remember, and presided over rampant corruption and exploitation of his country's economy by outside powers and corporations. America wasn't angry that the country was ruled by a strongman. America was angry that he wasn't our strongman.
3. That said, two wrongs don't make a right. Fidel really was a strongman. Lots of people fled the country or died trying to flee the country. He imprisoned gay people and journalists and dissenters of all sorts. The fact that he provided good medical care isn't really a counterbalance to that. American policy toward Cuba over the last century or more has been cynical, short-sighted, and often foolish. But that doesn't make Fidel Castro a hero. It just makes Cuba's story a bit of a tragedy.
Let's hope Castro's passing will help end that tragedy.