Get the non O retirement or marriage visa from the Thai Embassy before coming back to Thailand. They last for 3 months but then can extend for 12 months and you will then need to extend annually, but extensions are relatively easy to do yourself. The retirement option is the easiest. They require funds in a Thai bank (
*******
k), but if you transfer a monthly sum to your account (
*****
k) you can use the monthly deposits instead of having money in the bank for the second extension and withdraw the lump sum. Good luck.