Their is one 800 pound gorilla in the room that everybody is ignoring; actually two and maybe three,
First one the Durant Line. It was designed with the Russians in mind by the Brits. Pakistani side has all the heights in what is the worst terrain in the world. There are only two routes and roads from which the Russians can attack into Pakstan, one is the Khybar Pass, the other the Bolan pass. Both are covered by a corps plus troops, who will occupy the heights. The terrian will pretty much neutralise the Soviets advantages in air and armour, air attacks, will be suicidal at low altitude and ineffective at high altitude. And even when the cross the pass, they have mountainous terrain all the way down south till after Islamabad.
Second
By this time the Pakistanis had nukes, only a few, and B-57 bombers to deliver them.
Third
The Russians never had the capability to mount an invasion with the 6 or so divisions they had in Afghanistan. Zia used to say that he would get worried when they moved some of the Cat 1 divisions from E Germany, and the massive air regiments, and then he would invite the Americans in.
All in all, an attack was not as simple, and with the formations they had, the terrain, and the level of resistance expected, impossible unless they greatly increased their military capabilitys in the region, an effort which would be countered by a US reponse, perhaps with their XVIII Corps.
To take an example, the 1968 invasion of Czechoslovakia included 300,000 men in about 25 divisions. The forces in Afghanistan never exceeded 6 divisions or 100,000 men (and this includes the indep regts that were involved).