What countries have explicit visas to accommodate remote workers (e.g. https://www.wherecani.live/blog/view/digital-nomads--the-sel...)
What countries are popular with digital nomads because they're cheap, tropical, and no one is probably going to ask too many questions if you hang out on your tourist visa for a good stretch.
To work legally in Thailand you need a work permit which you can only get on an eligible visa. A tourist visa or visa exempt stamp, which digital nomads enter on, is ineligible. And it requires an employer to sponsor it. Even volunteering requires a work permit.
As long as you keep it quiet and don't make enemies you can fly under the radar. But if someone rats you out or the police see an opportunity to make some easy money you will have a very bad time.