I've done first class overnight trains in Thailand including private cabins and they are not comfortable or an enjoyable way to travel. They are bearable, slightly better than 2nd class. I always arrived feeling as though I needed 3 days to recover.
Don't get me wrong, they can be fun, just not easy to sleep on and I always feel sweaty and dirty when I get off.
I'd fly every time. Penang is good for a couple of days.
Every option advised is an illegal fudge or near illegal fudge.
For the first year, you can get a multiple entry tourist visa and extend each one giving you 6 months or so. You might even be able to stretch that out to a year with a border run or two.
Of course there are education visas for those so inclined but with all of these, costs creep up and any parasitic agents want their cut.
At the moment, the best sub aged 50 option is the 600k Elite visa. OK, that is 120k a year but no hassles and it is legal. IMHO if you haven't got the money for it, you haven't got enough to consider living overseas for years.