I have always tried to hire better than I am (and ever will be); not to say i'm very good, but a lot of people are very bad. I hired, multiple times in my (30+ year) career people who are much better than I am at pure tech stuff like creating great code. I would love for someone to make me obsolete (I don't think looking stupid is a thing), then I can focus on other stuff. In my first company I was the founder and CTO; I replaced myself with a much better CTO who was so much better that I suddenly had literally nothing to do. So I went on to create + run our research (r&d) group which was a lot more fun than being CTO. Far too many people stay in positions they don't like for pure ego; I don't care what they call me as long as I like the work and I get paid enough, in that order.
I guess when you have a job and this happening it would be less good. Although I would see it as a sign to go do something else.