A man erected a banshee-type figure during a campaign of harassment against his elderly neighbours, a court has heard.