Yeah, it is likely that AI can learn to glue code from stack overflow pretty soon. Harder programming that requires you to do a bit of thinking seems more future proof, these models aren't good at thinking at all instead they just pattern match and glue in previous solutions.
In my humble opinion, Mike Acton's talks are the best introduction, although he doesn't use the term "first principles", and they seem - at the surface - to be about game engines, but they are generalizable to everything.
"waste" a lot of time reinventing wheels (the lower level the better, ultimate example would be writing your own OS) and other stuff that has no practical outcome for your immediate problems.