HR or not, tell him bluntly (and in the text message) to cease communicating with you. If he ignores your request and this garbage continues, file a statement with the police.
They won't do anything right away. But make sure they take your statement and don't leave without a police file number.
When this nutjob gets fired and starts seeking revenge from you, expect his messages to become threatening. DO NOT REPLY!
Just record everything with timestamps, and email the evidence of every threat he makes to the police with the original file number in the subject line.
This will suck for a while. It will be scary.
But when enough evidence builds up to support a criminal harassment charge against this guy, then the police will act.