As for the whole mess about leetcode and other results of Goodhart's Law, for full timers they had the standard interviews plus a project presentation to the whole company. It's a simple system but it worked really well.
Sometimes we needed boffins (including HR). We'd hire them part time as consultants. This is especially useful when you need a specific thing done but it isn't consistently happening. With regards to HR, I think it's an example of idle hands are the devil's playthings. The job HR does in an optimized company is infrequent (hiring cycles for students, additions). So in between they come up with irrelevant systems to show work and increase their power. I don't know if there's already a law or theory to this effect, but I strongly suspect if you have a critical mass of "middlemen" (think MBAs, HR, etc) - people who do don't really build or make anything - their natural tendency is to create systems that increase their power and keep them there.
But you're talking about a startup. I think it's an unavoidable feature of organizational growth to start to accumulate "idle hands" - aka bloat, aka the Bozo Explosion. Finding a way for a startup with a simple hiring cycle to reduce HR is one thing; finding a way for Apple or Intel to avoid it is completely different, and you'd have to solve the Bozo problem both for finding hirees and for over-hiring HR people. It's a self-perpetuating thing, too, once a company reaches a certain size.
Put differently, what you say about a critical mass of "middlemen" is true; the problem is, any organization will reach that critical mass at some point, regardless of its original charter or team structure or composition.
For me, this is just why it makes sense to always work for small-to-midsize companies and never for large ones.