I don’t think either of them saw any writing on the wall. I’d love to see a documentary of whatever the hell happened though because I’m pretty sure there’s a lot more to it than what the public has been told. Given the rumours that Zidane will get a job at Juve either as a manager after Allegri or a counseling role I believe them leaving was connected.
And to answer your question, yes. It’s the perfect move for Ronaldo’s career as there was nothing else to do at Madrid. Now there’s a new challenge, new records to beat, new trophies to win, new teammates, etc. it’s a risk but that will be good for him. Hopefully Inter fans are kinder to him than what Barcelona fans have been