Yes, there all manner of sensors and PLC controllers for various cool things. I am working on installing an "Abstandssteuerung" next. It senses when one car is following too closely to another and momentarily turns on that under-road magnet to halt it until it falls back a few feet. also have two planned uses where a "turnout" has a car turn off and stop, then senses when no collision will occur with other traffic it if lets it turn and get back into the traffic lane. One will be a taxi pulling out of the traffic lane into the taxi stand in front of the hotel, another, for cars going through the drive in window at a bank.
There is also an operating traffic light and four-way intersection control which I might install, although i don't think I can build roads to I have a four-way intersection anywhere on my layout.