A neighbour who bashed two family dogs with a pole was then targeted by “appalling” vigilante attacks, a court has been told.