Fredo definitely had more than three strikes as far as family loyalty was concerned:
1) Botched his job to protect Vito during the assassination attempt on the street;
2) Directly undermined Michael in the meeting with Moe Greene. Since Michael was newly-installed in the role of the Don at that time, it was more crucial that outsiders like Moe Greene take him seriously in that role, and Fredo trying to go over his head to Tom Hagen and to Vito completely undercut that. Then, of course, Michael's direct warning: "Don't ever go against the family, ever."
3) Whatever his role was in setting up the hit attempt on Michael at the Tahoe lake house, takes the issue to a new level. It's not just a problem of Fredo being an annoyance any more, now it's life and death.
4) The episode in Cuba, clearly Fredo is still lying to Michael about his involvement with Roth/Johnny Ola. He denies to Michael's face that he even knows them, then of course at the sex club, he blurts out to Geary, "Oh yeah, Johnny Ola knows all these places," so obviously Fredo and Johnny Ola are old whore-chasing buddies from way back. That, of course, is the moment when Michael knows Fredo has to go.
Then the scene at the boathouse, Michael gives Fredo one last chance to come clean and spill the beans on the Roth operation, but still Fredo is hemming and hawing and covering up. The last straw.
If Sonny had lived, and Fredo betrayed the family again and again and again, the way he ultimately did with Michael, I think certainly Sonny would have had Fredo iced.