As a hirer, hire those better than you. You want to be the dumbest in the room. That goes doubly if you consider yourself smart. The smarter will help you to be the best.
As a subordinate, accept that your job is to get credit for those higher than you. If you are working for the right people, you are going to get either credit or some other benefit. If you are not working for the right person, you'll soon know it when credit does not trickle down.
Finally, in the words of Mattis, "Be polite, be professional, but have a plan to kill everyone you meet."