>> If you join a company, my general advice is to join a company on a breakout trajectory. There are a usually a handful of these at a time, and they are usually identifiable to a smart young person... Spending a few years at a company that fails has path consequences, and working at an already-massively-successful company means you will learn much less, and probably work with less impressive people.
I actually find it opposite. First of all, it is not so easy to identify a company on a breakout trajectory. The line between a breakout success and failure is just too thin on an early-stage startups. Even if the startup works on the same field as your expertise, you have been following that field for years, and you think the founders are brilliant, you can still get the judgement wrong a lot of the time.
I think a startup's failure is not so bad for a young and ambitious employee. There are just as many lessons can be learnt from failure as from success. As for path consequences, the young kids got so many productive years left and one failure is not really destructive or harmful. And a great thing is, if a startup fails most likely it fails fast. For your next job, people won't hire/reject you because the previous company you worked for failed, they hire/reject because you are brilliant or not. Likely the stuff you learnt in the failed startup will make you a brilliant person (tech and non-tech wise).