To implement his Infinite Tsukuyomi plan, Madara would have to get his Rinnegan back. Given his propensity to plan everything, he had to have a plan when he died the first time. How did he plan to get the Rinnegan back?
He could not have expected Nagato to die becase that was pretty random. What he probably was expecting was that Nagato would be alive and that he would not cooperate with himself or Obito. So did he think that black Zetsu could overpower Nagato and order him to use Rinne Rebirth? But if Black Zetsu can overpower a Ninja as powerful as Nagato could he not have simply overpowered Hagoromo at the very beginning and be done with it?
The second possibility is that Black Zetsu can only overpower a ninja who has already been weakened. There are apparently three versions of Edo Tensei: Tobirama's, Orochimaru's, and Kabuto's. Madara could not have possibly known about Kabuto's version (he died before it was developed), he may or may not have known about Orochimaru's version. Was it not incredibly optimistic of him to expect to defeat alive Nagato as either Tobirama-style or Orochimaru-style Edo Tensei?