Two solutions I have seen (thanks to the news):
1. Be being a world-class academic on a hot ML topic consulting to a huge tech company at a strategic level
2. Be the prime minister of a G8 country and consult for global investment firms
If you're a software engineer or even engineering leader at a startup/SME you're not going to find these contracts unless you're in the 0.001% of the market for a niche skill that's desperately in need.