400k is the absolute minimum at any point in the qualifying period, you need it to be say 420k, and then on the day you can do a withdrawl of 10k without any worry and enough to cover any bank charges that might pop up during the book refresh.
Technically you can stay out until the day before your visa expires, it will be mentioned in the reentry stamp. However, unless you have written permision from your school saying how long they are allowing you to skip lessons and a good idea would be the why, you could be refused entry. So if they give you 3 weeks in the letter, you have to return within the 3 weeks.
but you also have to consider in the worst case scenario, that if you get a remittence of 800k from an agent in the year you become a tax resident, you are liable for the tax on that for the next 5 years.
he means that if you know your moving next year (and will be tax resident next year), any money transfered this year to Thailand is not treated as assesable if this year you spent less than 180 days in Thailand.
Presumably if on an extension you will have a current work permit to work in Thailand. This needs cancelling and returning to DWP before you leave and cancellation of business visa at IMO. You need supporting document stating last day of work. You will probably have to request a denial of extension stamp giving you 7 days to leave Thailand, depending on your timeline. Expect extra scrutiny in the embassy in LAOS on your paperwork, as to the sudden change in your circumstances, one day working in Thailand, now not going to work in Thailand but having an unbroken income stream.
you can come in with no visa (visa exempt) for 60 days plus another 30 while you get the lay of the land, and at any point take a trip to a neighboring country embassy to kick off the visa process suitable to your plan.