A factory worker who harassed a Jewish family at a car boot sale as part of a catalogue of public order and terrorism offences has been jailed for four years.