SpaceX is preparing for the first crewed launch of its Crew Dragon capsule. Engineers have spent years planning for what happens if things go awry.