Honestly, not matter how much I like him, I don't see Sasori beating Madara...
Pretty much no one but the sage can actually stand up to him, he has
Sharingan, Rinnegan and Mokuton. On top of that, he can make at least 25
wood clones capable of using Susanoo, and maybe even perfect Susanoo,
although this was not shown.
Depending on the intel he has, Sasori might, or might not poison him. But what
will he use to seal Madara? And the poison will have to take effect, Sasori will
be dead before it does. So I doubt that he can even hit Madara before he's
crushed.
Madara=OP
Honestly, I can see Naruto using talk-no-jutsu to have him leave on his own will.