Here is a link to a NYT article on the subject:
Thai Hotel That Put American in Jail Gets New Label on Tripadvisor (Published 2020)
It involved repeated negative reviews of a hotel, the Sea View resort on the island of Koh Chang; and the hotel contacted the guy and tried to work things out before it filed the criminal complaint. The guy was released from jail after two days after he and Trip Advisor met certain conditions.
The Thai law is called "criminal defamation" in the article. Defamation means making false statements, so if your statements are true, that might be a valid defense. Though the military is running the country, so you can't count on that.
Seems like it would be a wise precaution to post negative reviews of Thai businesses anonymously. But I also expect that most Thai businesses that service tourists will see that filing such criminal complaints is not in their best interest.