Most likely if he were prosecuted it would be under the Communications Act of 2003. Here's a relevant passage from Wikipedia,
Section 127 of the act makes it an offence to send a message that is grossly offensive or of an indecent, obscene or menacing character over a public electronic communications network.[9] The section replaced section 43 of the Telecommunications Act 1984 and is drafted as widely as its predecessor.[10] The section has been used controversially to prosecute users of social media in cases such as the Twitter Joke Trial and Facebook comments concerning the murder of April Jones.[11]
On 19 December 2012, to strike a balance between freedom of speech and criminality, the Director of Public Prosecutions issued interim guidelines, clarifying when social messaging is eligible for criminal prosecution under UK law. Only communications that are credible threats of violence, harassment, or stalking (such as aggressive Internet trolling) which specifically targets an individual or individuals, or breaches a court order designed to protect someone (such as those protecting the identity of a victim of a sexual offence) will be prosecuted. Communications that express an "unpopular or unfashionable opinion about serious or trivial matters, or banter or humour, even if distasteful to some and painful to those subjected to it" will not. Communications that are merely "grossly offensive, indecent, obscene or false" will be prosecuted only when it can be shown to be necessary and proportionate. People who pass on malicious messages, such as by retweeting, can also be prosecuted when the original message is subject to prosecution. Individuals who post messages as part of a separate crime, such as a plan to import drugs, would face prosecution for that offence, as is currently the case.[12][13][14]
Revisions to the interim guidelines were issued on 20 June 2013 following a public consultation.[15] The revisions specified that prosecutors should consider:
whether messages were aggravated by references to race, religion or other minorities, and whether they breached existing rules to counter harassment or stalking; and
the age and maturity of any wrongdoer should be taken into account and given great weight.
The revisions also clarified that criminal prosecutions were "unlikely":
when the author of the message had "expressed genuine remorse";
when "swift and effective action ... to remove the communication" was taken; or
when messages were not intended for a wide audience.
https://en.wikipedia.org/wiki/Communications_Act_2003
Elsewhere, I see that harassment is defined such that it includes "causing alarm or distress." See
https://www.lawyer-monthly.com/2019/...vs-harassment/
Sounds like if this applied in the USA a few posters in this forum would be risking a fine or trip to the big house.