I think that's just a sensor to detect how close the traffic is, to allow the lights to turn red.
They don't, I think, turn red when there's a car too close, to avoid (ironically!) cars either going through a red light, or having to brake too hard.
I'm sure you'll be fine. Even if you're not, they may just offer you a driver education program. Worst case scenario, it's 3 points. As a PP said, unless you're already sitting on 9 points, it's not the end of the world.
In future, if you've got someone tailgating you like that, you have two options:
- carry on driving at the speed limit and ignore them; or
- pull over to get out of their way and let them get on with it. Karma will catch up with them soon enough.
I agree about getting a dashcam though. I've had one for years after I reported an idiotic driver and the police couldn't do anything without evidence.
I've only reported a couple of incidents since, but one ended up in a prosecution.
Edited to add: sorry - quoted the wrong post - meant to quote the OP questioning what the little black box was.