I was curious if you've looked at the state of this recently? Is this doable for a foreigner/digital nomad again? Any insights? What are the long stay options there? I know visas used to be very generous, I've no idea now. It does sound nice though.
I spent several weeks of Nov/Dec 2021 in Phuket while I was between contracts. Things were just starting to open up and come back to life as restrictions were being lifted. Many places were still closed or had gone out of business, but there was no lack of dining, massage, bar, or outdoor activities.
Internet was reliable and fast with my 30 EUR 30-day unlimited data Thai SIM card (AIS brand if I remember correctly). Most hotels had decent wifi as well, but I often didn't even bother using it.
There are multiple visa options (which you can do a search for), and there's a subreddit just on this topic if you don't mind digging a bit. All options involve some expense and/or extra effort, but it's still a small cost considering the benefits of being there.
Lodging is easy and cheap (particularly with COVID 50% discounts which may be vanishing slowly). My advice if you're going to stay for more than 30 days is to get a hotel for 5 days, and then start asking around and just walking/driving around looking for flats or rooms to rent. Not everything is listed online. There are also a lot of Youtube bloggers who like to show off places they encounter.
One can live comfortably for $1500/mo or less, or frugally for $1000 or less. It's also possible to spend $5000+/mo if you want to live in luxury. Speaking fankly, luxury villas and "human entertainment" tend to be the big costs for some people. I can't speak to specifics since that's not my kind of scene (and honestly I didn't really see many other visitors who were acting like high roller party boys in Vegas).
Be aware that officially, working while in Thailand is not approved without the proper visa (which probably 99% of DNs don't have). Practically though, sitting on the balcony behind a computer (and getting paid to do so) for several hours a day is not high risk. Just don't flaunt it.