Staying in Thailand / getting caned in Singapore??

I guess I have two questions....for context, I am 31 and a British citizen.

  1. How long can I stay in Thailand? I was hoping for a few months but I read online it's only 30 days. How do people end up living there for years at a time? Feel like I'm missing something.

  2. Most flights I look at include a layover in Singapore. Obviously I don't plan on anything illegal but their customs officers seem super strict? I read about the chance of caning? The whole thing made me super paranoid, but the other layover options are way more expensive flights overall.