Actually, Madara is the plot device. His plan on his resurrection was stupid and would not have gone through without Black Zetsu's help. So Madara's revival itself was a plot device enabled by Zetsu who was called a plot device. In reality Madara was of no importance and the story could have gone smoothly without him. Black Zetsu would have just had to solo Obito like he did with Madara, then Kaguya's return...
In short, Madara was a meaningless middle man.