Sports, IMO, are one of the best ways that families that have everything "put together" can show their kids some adversity. And for kids, everything is local. So while losing a basketball game, isn't like a dad losing a job, for the kid it can still seem like a really big deal.
In that regard, it's all about calibration. If you're the smartest person in the room, good for you, but you should also find another room where there's more challenge to be had and more fun to be had.
Note that all levels of accomplishment are something to celebrate; I'm not suggesting the kind of "nothing is ever good enough" reaction that leads to kids doing things they don't actually have an interest in doing. However, when you find an area of interest, go deep into it and find creative challenges that push you to go even further.
Also, those kinds of competitions, whether sports or academic, aren't necessarily a sufficient view into human nature. For example, most competitions like that have a clear set of rules and take a dim view of cheaters, while many other aspects of life reward creatively "cheating" to get ahead over always doing things the long way like everyone else is. Consider how people talk about finding a creative solution that takes less work: "I could have written a complete implementation of $foo myself, but I cheated by hacking $bar into mostly doing it for me, and it worked well enough to get the job done." See also Larry Wall's praise of "laziness, impatience, and hubris".
A consistent process and consistent rules produces consistent results; that's good for not doing worse than normal, but it also means you'll never find a way to do better than normal.
Find ways to reward creative solutions over unthinking rule-following. Play games that rely on creative deception and hidden information. In a competition with rules, follow the rules; in life, have a set of principles you live by, but don't automatically respect every arbitrary rule, especially the implicit unwritten ones that nobody questions. Just make sure you understand the implications and consequences, because it might be there for a reason rather than solely for the sake of arbitrariness.
Related to this: if you have kids yourself, or you're in a position of providing guidance for kids, keep providing a safe and consistent environment for them yourself, but teach them that the world is not fair, that adults are not always right and not always consistent, that they themselves are not always the smartest person in the room (nor should they always want to be), and that other people care about themselves much more than them.
Or, in short, don't just teach them that the world is awesome (though it can be); teach them how to get what they want out of a world that's not out to hand it to them.