Easy..If you are in the know..
I have been here for over 5 years now. Never left the country for any reason other than visits.
I have been on a Thai wife Visa for the 5 years. My wife just shows 2 months tax payments from her business and I get my Visa from her. A Thai wife has to show a lot less money than a foreign husband.
I also Have a work permit. But do not use this to get my Visa. I keep this separate. If I need to ditch the work permit then I still have my Visa to stay. All of this is possible to anyone who is willing to grease the wheels. And of course know the right people at Immigration.