It is plot that Nagato had a change of heart in the sense that this is what Kishimoto wanted to happen and made it so. Everything bends to the whim of which direction Kishimoto wants to take the plot, that's just the facts.
But I do think people underestimate Naruto and overestimate Nagato. Both of them are in the same tier, which means a match between them comes down to circumstance (knowledge and plot). Knowledge determines who has the advantage or best odds of winning, while plot decides the ultimate outcome.
In the match that happened in the manga canon, Nagato had knowledge on his side, while Naruto had plot on his side. The only things Nagato didn't have knowledge on when it came to Naruto was Frog Katas and FRS. On the other hand Naruto had to learn about Pain on the fly ether by figuring things out on his own or only recieving knowledge from Katsuya/Fusaku/Shima whenever they felt like sharing it with him. If knowledge was equal Nagato wouldn't have known about Magen: Gama Rinshō and there is a decent shot that Pain would have been defeated by Magen: Gama Rinshō before all that other shit with Hinata, Kurama, Minato, etc... happened. Than if Naruto was just trying to kill Nagato, rather than wishing to talk to him, there is any number of more effective ways he could have taken on crippled Nagato rather than simply appearing directly in-front of him.
Naruto had plot on his side, since he couldn't die at this junction in the manga, so Kishimoto ensured his victory by Deva needing to recharge and compensated for Nagato's knowledge advantage with the Hinata, Kurama, and Minato stuff giving Naruto a second chance to face Deva Realm with equalized knowledge.
Without the plot on his side Naruto would have lost, due to Nagato having the knowledge advantage. But this doesn't mean under different circumstances Naruto couldn't have won w/o the plot on his side. For example if Naruto had the knowledge advantage going into the match, even if Deva wasn't recharging, he'd have a good chance to win. Naruto would have Shima and Fusaku start Magen: Gama Rinshō right away knowing the threat of Deva Path, than all he would need to do is hold of Pain Rikudo for a little bit until the song took effect, which with full knowledge he should be more than capable of.