Yes you are absolutely right in your thinking. You must be thinking if these you countries couldn't resolve similar and many same issues over the several decades why now?
In Musharraf's coup the age of broadcasting and mass media had already set in he desperately wanted to legitimize his rule. At first he tried a masked Presidential election which did not work out, his continues support for the Taliban angered the US. China always found it easier to influence Democratic politicians rather than military strongmen. When he turned against Pakistan in OTL it made LeT, JeM and IM go crazy and high tensions prevailed between them and the government and minor incidents started occuring within Pakistan itself which necessitated allowing a large raid in India to ease the tensions which culminated in 26/11 attacks.
ITTL they attempted a coup against the Pakistan Army rule which is not very far fetched as hot heads are moments away from such steps and they can pose as liberators to the people, freeing them from the Dictatorial Rule. Coups against army if one has popular support is quite possible with very few examples though and the those groups enjoy a popular perception in Pakistan too. After all their class 10 history books blame Hindus for the partition of Pakistan. After turning against the millitants he needed to do something to legitimize his rule more than ever. His rapprochement with India surely raised nearly every eyebrow but something needed to be done to prove that he was not another military madman like Marcos or Pinochet. His act endeared him to the world and the Pakistani upper middle class who had nothing to do with India and were relieved that to get a peace from a looming nuclear war. Kashmir is a political weapon and everyone has realized that no one can control all of it and must accept the status quo. Once the core issue undermining Indo-Pak issues is resolved what stops cooperation now even Jinnah wanted India and Pakistan to be like USA and Canada. And after so many agreements have been signed what can be a better show of Solidarity than cooperation in disaster relief although opponents to this warming of ties between the two countries will still shout out their concerns aloud.
Spoiler Alert: Musharraf will return to Pakistan and get to the top position again