Everyone is different and it's likely that John Williams is understandably perfectionist, and his insightfulness allows him to see what he could have done better. Being human, that's likely to lead to some degree of self-criticism and regret.
My tendency is to look at things a little differently. I don't see any flaws in any music, including my own. That's not to say there aren't plenty of ways to improve, but ultimately, the music was that person's best expression of themselves, to the best of their ability at that moment in time. That different strategies or ideas could have been used is not a flaw (the way I see it), but a springboard for future improvement.
Just yesterday, I was listening to the first ever piece that I composed from last July, which I don't think I've listened to since then, and I was expecting to cringe. Of course, I heard many things that I'd do differently and more effectively now, but I was struck - shocked even - by how much that music still resonated with me. Like you, I could hear many of the "flaws" (I don't really think of them like that - just as if you see a painting by a small child, you don't see it as flawed compared to Rembrandt, you appreciate it for what the child put into it), but the essence of any music can transcend these.
If we can keep this more charitable outlook on our own and others' music, I think we'd be happier overall, as well as improving faster.
I like your suggestion that trying to create the next masterpiece is unhealthy, as it's most probably about striving to create something that meets others' expectations or criteria rather than simply looking for the most authentic form of self-expression.
I think that if we pursue the latter, it will be a more effective way of driving the search for improvements and expansion in our composing without the self-imposed pressure of feeling the need to prove ourselves.