2005 vs 2017:
AO: 2017.
RG: 2017.
WIM: 2017. (Curiosly, 2 loss against Muller)
USO: 2017.
2006 vs 2018:
AO: 2018.
RG: Debatable. (Lost 2 set less in 2018, and he was overall more dominant, but he hadn't an opponent like 2006 Federer)
WIM: 2018. (He lost a round earlier, but with a very close game against Nole, Fed beat him quite easily in 2006. And he need 5 set to beat Delpo, not Robert Kendrick)
USO: 2018.
AO 2007 vs 2019: 2019.
RG 2007 vs 2019: 2007. (He beat Federer in 2006 with the same effort he beat Thiem in 2019)
WIM 2007 vs 2019: 2007.
USO 2007 vs 2019: 2019.
Overall: 9-2 for 2017-2019 Nadal in slams, with one of them debatable.
2005-07 Nadal was slightly better in Master 1000 and WTF(And won more micky mouse tournaments), but this is more about "focus only on GS" and avoid injuries for an older player.
Overall, not even close. Only 2007 Nadal can be at his 2017-2019 level, 2005-2006 Nadal was nothing special outside of clay.