Lockdown your social media - you will need to block him so he doesn’t see anything at all. This will have a massive impact.
Move any bins that are at the front of the house to the back - my ex used to empty the coffee cups from his car and then comment on the contents of my bin/recycling bin. Get a Ring doorbell to stop any coming to the house when you’re at work and looking through windows etc.
Let close friends know you are uncomfortable and ask them to refrain from posting anything on social media with you in it for a few months - he will lose interest as avenues of information are blocked.
Consider who your friends are and be careful what information you are putting out there. If your close friend has a husband who is his close friend, refrain from mentioning him for a while so information isn’t passed to him. Long term, it maybe necessary to rethink some friendships. It’s unfair, but it can solve the issue.
Be vague with your children about where you’re going and who with along the lines of ‘just a work do’ or ‘out with some friends’. They can’t tell him if they don’t know.
If you have a MIL or SIL you trust, let them know you’re uncomfortable. They may quietly help.
Consider the police if it continues. They will warn him in the first instance and let him know it’s not acceptable. It would usually be enough to put a stop to it.