Iger, 71, agreed to a two-year contract after the board determined that Mr. Chapek, 62, had done irreparable damage to his ability to lead, with a string of missteps resulting in the lost confidence of Wall Street and most senior Disney executives, as well as many rank-and-file employees.