@Raza Rizvi
"If I opt out of 1031, all I need to invest in the Opportunity fund will be the gains. The initial downpayment etc. I can still cash out? Correct? Or am I missing something"
This is correct. You can reinvest only the capital gains portion into an opportunity fund. The OZ route makes a lot of sense, but as @Dave Foster said you should consider Recapture as well.
I also don't think Matthew mentioned this regarding OZones but you can only defer your original capital gain until December 2026 (Although the gain is reduced 15%). It is the gains made after the OZ investment that are tax exempt.
1031's are probably more powerful but really the best strategy is just to defer until you die and you can never really recognize the gain in a tax-friendly way. With Opportunity Zones you could have tax free gains until 2048. Then recognize the gain with zero taxes for portfolio rebalancing.
1031's will also likely be a bit more complicated with higher fees. Are you an accredited investor?