Well, detecting contact and yellow flags is not that hard. But what about incidents where none of those are present? Or incidents that have them, but are not really any interest? How about if there are incidents in a big succession like example bump drafting? Is a blue flag an incident? What if there is multiple incidents at the same time in different spots of the track?
Also you most likely would like to start viewing a bit before the incident, but LFS' replay system has to always run the replay, you can't truly skip to any one spot. So you would first have to run it to the point of incident and then run it from the start to the time just before the incident. That could become a problem in long race with many successive incidents.
How much before the incidents is a good time to start viewing?