You’d think they would have learned from the F4 Phantom program that one plane can’t fill all roles
I think you mean the F-111. The F-4 turned out quite well. The F-35 though is a much worse fiasco than the F-111. At least the Aardvark turned out to be a decent tactical bomber. The F-35 is mediocre on all counts.
Actually the F-4 wasn’t that bad. The program you should look at is the F-111 program. As originally sold there would be two variants of the F-111. The F-111A would be the AF’s ground based version. The F-111B would be the Navy’s carrier based version. I am not sure how many F-111Bs were produced but not more than a handful. Turned out that carrier operations were a lot tougher than the designers knew.
Oh well, 40 years later the military dreamers tried again with the F-35 with the same basic result - Naval and AF versions are totally different animals. I wonder if it will take another 40 years for another generation of super smart engineers to attempt this particular pipe dream again.
The F-4 was a great bird. It really could fill most of the roles even a bit imperfectly. It was (is) a great airplane.
The F-35 is a turkey. We threw away a winner to take on a loser. It's the equivalent of the F-111 Aardvark. Robert McNamara would be proud...