assuming you have the 800k baht in a bank account for the required time, you can just leave, re-enter on another visa exempt entry, then go to immigration and apply for the non-o for retirement.
The tax deduction for a Thai wife is like 60,000 THB a year (if she doesn't work). And most of my income comes from capital gains, taxed on 0% in the US but taxed 20-30% in Thailand. So being married to a Thai national does basically nothing to help me.
Singapore or Malaysia is probably where we'll end up once this system gets fully implemented over the next few years
I'm just going wait for next year to see what happens. Perhaps I will owe some tax next year. If that's the case then next year I probably move with my Thai wife to Malaysia.
Many countries already tax "global income" and Thailand is the next in line to do this. They will get it done, if that's what they want to do. It's pretty straightforward. Might take a few years to get the bugs worked out but you can bet this is the direction the Thai government is going. They will tax your global income, they will automate the auditing of it, and they will tie it to your immigration status.