This seems like something that could be detected while it’s happening (*). Maybe iPhones could warn users before lasting damage occurs?
(*) Edit: I was assuming that damage to the camera accumulates over time. If it happens on short time scales or as a single event as nicce's reply seems to suggest, this renders the notification idea moot ofcourse.