folks who write OS libraries/APIs are insanely smart
No, they're not, unfortunately. (I'm approximating "insanely smart" ≃ "one in ten thousand", so that there is approximately 750 000 of them on Earth right now.)
Some of them are experienced and create very robust, very efficient code, and others are just
productive. Very few are insanely smart. Based on the code they produce, I'd say
djb is one of the rare insanely smart ones; a lot of people dismiss him and his work right out of hand. Most of the programmers you see in the author lists in OS development, library and compiler development, and even huge software projects, are merely
very productive. Some of their code is utter crap, and a lot of their designs are fragile or inefficient.
Productive programmers concentrate on the new and interesting features, and expect others (typically system integrators and end users) to debug their code. Yes, they're innovative and productive; but not necessarily very smart; definitely not insanely smart. Some of them (look at e.g. systemd) even use fanboi fawning as a defence against having to fix the bugs they themselves caused, so I consider elevating developers who do not objectively deserve such, as actively harmful.
Insanely smart developers tend to produce not that much code. They seem to find a way to simplify most problems completely away; they do a lot with surprisingly little.
Some large projects like GCC and the Linux kernel are amazing, but I would not call their developers insanely smart either. They're very, very knowledgeable. You don't need to be insanely smart to create an amazing software project, but you do need to be industrious (since a lot of development is drudge work, taking care of details), innovative (in finding ways to solve many problems with not much effort), and productive.