All cars already have onboard computers that monitor nearly all systems in a car. A configuration of the software to monitor your interaction with the driving controls could easily detect impaired driving and place the car into what's known as limp home mode where your car will still drive but the computer limits the max rpm on the motor where it can't even keep up with traffic. My diesel truck goes into limp mode about twice a month due to a faulty pressure regulator which I don't want to pay to have fixed the computer automatically resets itself after a couple of restarts if the fault does nt reoccur. An impairment monitor could work the same way without stranding you or involving the police
There are many problems with simple solutions but again that's not the point as I'm sure I'm not the first to think of this
But then again maybe I am as I'm an inventor