I have never tested but I also already thought of a logic of this type, with the traffic lights. It would be possible to use the stop / jumps that are inside the traffic light : I think of two tracks, on a straight road, that changes the state of the traffic light.
For example the light is always 6:Green, and when a car is detected on track 1, the status of the light changes (via a jump or a stop if no approach)(example : 7:Green). When the car has passed the distance of track 1, the car is detected on track 2 and the status of the light changes (example : returning to 6:Green).
After that it would be easy to parent an object to this "crossing", script it and to display the speed or a flash after a bit of calculation.
So by default the light is 6, when a car arrives the light becomes 7 : we start the "counter", when the light becomes 6 we stop the "counter" and we calculate the speed and display it.
The shorter the tracks, the better the cars will be detected during heavy traffic, but the less the speed will be accurate (because of the shorter length).
I always wanted to try, so I think I will do it soon.
Almost anything is possible, like the bikes (that I already did 6 months ago but never published

)