The least risky way is to join a pre-IPO, VC funded company after it's at least past Series D round, and get a significant equity package that is equivalent to at least 2-3x the same pay at a FAANG company.
Then be patient, wait for an IPO or acquisition. Note this could be years. And during that time you won't get any liquidity (like a FAANG employee would).
Depending on length of time, this could result in several years of above market pay (through stock which continues to vest post exit), or a one time big payout that averages to more than $1MM/year. Note that depending on tax treatment (ISO versus RSU), that could reduce your after tax payout.
Other options would include starting a company or joining even earlier stage (before the Series C). But then the time horizon for an exit can go up, and the risk also increases as many times the equity gets heavily diluted or the cap table is adjusted significantly to make room for later stage investors.