The key is good health insurance now, build up savings quickly and then if needed can use money from the savings for serious stuff not covered by health insurance.
But the private hospitals are very nice indeed in Thailand and very affordable as well. A decent healthcare plan for me + girlfriend would cost us around 1200 EUR a year (total), while in The Netherlands it would be double that amount and we would just get basic healthcare (i.e.: not to be used for private hospitals).
I do believe it's highly unlikely I will lose my job (mobile programmer) in the coming years. I believe there will be plenty of work for at least the next 10 years and probably much much longer. And as a freelancer I might be less affected by ageism.