The comment was hoping that Elon would have an arrest warrant out on him, of the belief that he would never enter Thailand and was pointing out that the maximum penalty was imprisonment. There is an element of crazy - nobody should be facing arrest for saying nasty things. Maybe a fine, after a difficult court case.
Leaving aside that Thailand's defamation laws are largely a club to stop people criticising the government and not really intended for use against people like Musk.