Kaguya,
Chakra arms ripp Madara's PS
S/T Portals + Ash bone to kill Madara.
Genjutsu wouldn't be factor as both posses top genjutsu power
Basically it comes to if Kaguya can see or sense Limbo clones to fight them or not. If first scenario then Kaguya takes this, else it can go either way but still lean more towards Kaguya.
The "World attack" dimenssion is gg for Madara, who has no response for that with feats he has shown, unless we take assumptions in cosideration but it wouldn't be right.
Prime JJ Hagoromo
- Goudama cancel each other
- Hagoromo knows a lot of Genjutsu and he knows how to cancel MT, so he would cancel it in theory which leaves DRG JJ Madara as opponent.
- Both have Rinnegan mastery but Sage has more expierience with Rinnegan
- Goudama cancel each other
- It basically comes to how has more chakra and Hagoromo has more (Yin Kurama)
- the seals would be problem for Madara as well, so he would have to avoid direct combat.
- Summoning spirits from pure world would help Hagoromo
It could go either way but I lean more towards Hagoromo.
These are only two people who would do that.