In the scene where Vito tells tom it was Barzini all along, he also says Tattaglia's a pimp. He could have never out fought Santino. Later, when Michael tells Tom he's out as consigliere, Vito tells Tom he never thought Tom was a bad consigliere, but that Tom was a bad Don. In other words he was good enough to beat Tattaglia, but not good enough to beat Barzini. There are several things I can point to some of which may have been known to Vito and some of which robably were not.
1. Temperament. Sonny did not have the temperament to be a don, which is fairly obvious. He was impulsive and trigger happy. One example is his having Tattaglia's son killed because Michael got slapped around by a cop acting as Sol's bodyguard. If you take the Bonasera example this was not justice. It actually escaated the war and made Sonny a viable target for a revenge killing. And of course his bad temper was his downfall.
2. Judgment. In the middle of a dangerous war it is not a good time to continue to be playing comedy with a mistress who lives in a place that looks like an easy target and which requires the of several body guards who could be of better use doing something else. He also refused to listen to Tom about de-escalation so the family could do more business.
3. Getting Michael involved. Michael volunteered to kill Sol and McCluskey, and they did hatch a great plan, but Vito never wanted that life for Michael, and when he got the news that Michael had killed Sol he was not a happy camper. I think he somehow held this against Sonny. Had Sonny been more cunning or more patient, perhaps he could have found another way to deal with this problem.
Any other ideas?