Legal chiefs in tech vastly out-earned their counterparts in other industries in 2022, even though tech underwent a retrenching last year marked by tens of thousands of layoffs and plunging stock prices.