It sounds cynical but I learned too late that a company's success is only incidental to your own success as someone who works there. If you think this is too negative, I'll just say I've seen a lot of "executives" run companies into the ground, then get great, high-paying jobs at acquirers, because they managed the politics well. It sucks but it's life.
Most tech management, especially young founders of VC-backed startups (vs. larger companies or owner-operated companies where the owners have a lot of skin in the game) is frankly pretty bad. It's just not celebrated or taken seriously the way it is in other industries, or fields (e.g. the military). I'm not saying this pessimistically, quite the opposite--I've seen a lot of bad management and I think there's better out there, but it does seem to be vanishingly rare.