Is there any option for passengers to chose another airport? Or for ATC to force the plane to use the next best airport? For example if the runway is under construction and severely blocked.
I would imagine it is aware of NOTAMs that indicate runways being closed when it picks where to land.
It's probably a possibility in some bizarre & unlikely set of circumstances with perfect timing, but even then it's still a better outcome than flying into the ground uncontrolled. See the Gimli Glider where a 767 flown by humans was forced to make an emergency landing at a runway that was actively being used as a dragstrip during the landing—everyone survived.