An interesting observation on the topic of salary disparity is that the more punishing taxes on high earners are the more it incentivizes companies to pay people more evenly since more of that money will actually end up in your employee's pockets.
More likely, above something like $150k/year you instead get the money via some legal construction that doesn't yet count as salary and is not taxed until you turn it into privately owned cash (since it's not as if you need that much money in the first place, so you don't need to tax it all now). I think the way I heard this works is that you aren't officially employed, but you start a company that is hired. Companies pay something like half of the highest tax bracket on profits (2x% vs. 50% iirc), and the name of the game is to make a loss: buy more houses, invest in a renovation of your properties, etc. so you don't even pay (most of) that reduced rate.
The real opportunities to dodge taxes are only available to founders and major stakeholders. At those levels you can take out extremely low interest loans backed by your stock to fund your lifestyle. These loans are continually rolled over, and only finally paid back upon your death (via sales of stock). Even if your initial grant of stock was taxed as income, as is usually the case for non-founder executives, the tax reduction is significant.
Regular engineers at FAANG companies don't get anywhere near enough stock granted to them to pull this off. It would be legal too, they just don't have enough shares to convince Wall Street to let them.