I know a “principal engineer” who can talk the talk, write books and articles but can’t produce any software of real value, and I work with a guy who’s been working 1/8 as long as me and he’s ten times better.
Perhaps you're measuring value too narrowly. A principal engineer can act as a force multiplier for the entire team, even if they themselves are no longer efficient individual contributors.
A senior IC that codes can stay relevant longer. The act of coding forces you to keep up.
His answer is: on high leverage activities. Instead of fixing a small bug that affects a few customers, fix a big one that impacts revenue; train others to be better engineers, multiplying their future output; improve the process your team uses to build product. Essentially, look for activities that multiply output, rather than add to it.
Gandalf in the battle of Minas Tirith is a huge force multiplier. He embiggens the courage of everyone near him and makes them fight harder and better.
Of course knowing everyone individually is best, but that doesn't scale.
Most of the places I've worked are small to medium. Titles don't matter all that much. One place tried to develop a technical ladder to coincide with their management ladder. I don't think it worked out too well, but they did establish "leads" that were more likely to hop around and mentor. It didn't really change their responsibilities. It just formalized and endorsed what they were currently doing. It really helped to narrow down for people who to go to and allowed those leads to spend time on those kinds of issues.