Handlebar Tech makes a Quality Score based on Cars being Unsafe / Uncomfortable (Automatic Map Builder)
Took me a sec to see the vision, but after reading I agree it could be a really useful idea.
Combining this with accelerometer data (road quality) and sound could make for a pretty good scoring system.
https://newatlas.com/bicycles/proxicycle-bicycle-sensor-safe-cycling-routes/Open linkView original on lemm.ee
If you had the camera on too, it could give you an actual distance measurement to give to the police.