Thai police can be corrupt sometimes (not always - I've even been busted for pot twice, talked my way out of it both times even though they knew they could have gotten some western cash out of me), but Thai justice system is usually quite fair even for foreigners. There are exceptions of course, but usually you won't get into real trouble unless you are doing something that is obviously illegal (doing drugs, running prostitution ring, something something royal family). Even some my friends have sued and won against a big bank or people hustling money from them.
I haven't researched much about this but India seems like a better fit for tech workers? There I'll find folks who share my interest and the culture is good too.
When's the last time you went to one? I had three different reasons to go to one in the last 3 years and each time I was in and out in under 30 minutes with almost no wait time. This meme is garbage.