I went searching online and it seems there is actual such technology, it may be used in the truck industry but also in some more expensive sedans.
Source
www.autoserviceprofessional.com/articles/4844-can-we-trust-oil-life-monitors
"However, a sensor that could monitor the actual engine oil condition was developed. These oil condition sensors take advantage of the fact that the dielectric properties of engine oil change as it wears out, breaks down or contamination builds up.
These sensors are even capable of detecting the depletion of the oil’s additive package as the oil’s acidity increases and can identify engine coolant or fuel in the oil.
Mercedes-Benz takes advantage of an oil condition sensor in its Flexible Service System (FSS) or ASSYST systems to extend the oil change intervals of these vehicles. BMW also uses a similar sensor to evaluate the actual condition of the engine oil and extend oil services on their models.
The oil condition sensor is allowing extended service of upwards of two years and 15,000 miles if the proper oil is installed."
From a 2008 publication from Mercedes
www.autoblog.com/2008/03/12/mercedes-benz-new-oil-sensor-can-keep-you-driving-safely-on-old/
In order to determine the ideal moment for the next servicing, the Daimler researchers therefore use a special sensor that provides clear readings. This sensor, which is integrated into the oil circuit and registers the characteristic parameters, allows the engine oil to be monitored directly.
To evaluate the quality of the oil, its so-called permittivity is calculated by means of an AC potential applied between the interior and exterior pipes of the oil-filled sensor. This parameter is a measure of the extent to which the oil can transmit the applied electric field. If the engine oil is contaminated by water or soot particles, it polarizes to greater extent and its permittivity increases.
However, not all impurities can be registered with sufficient precision via the electric field. The researchers use viscosity as a further quality marker to detect any diesel fuel that may have found its way into the oil. In the laboratory, they use an orifice viscometer – a container with a small opening through which the oil flows out. The time required for this process - the "efflux time" - which is dependent on the oil's flow characteristics, is a direct measure of its viscosity. This in turn gives an indication of the oil's remaining lubricative quality.
The Daimler researchers can also measure viscosity while the vehicle is in motion by observing the oil's side-to-side motion in the sump. The more slowly the oil moves, the higher its viscosity. This movement is registered by the oil sensor and the viscosity calculated on this basis.
One single sensor, and the intelligently processed information which is already available on board the vehicle, are sufficient to determine the various parameters of the engine oil. This onboard oil quality surveillance is currently being prepared for series application in commercial vehicles. The resulting precise calculation of due times for maintenance stops will allow oil change intervals to be extended by about one-fourth.