In future Pakistan will not be a threat to India, not in the way it was in the past anyways..Because India Pak is something that exists under the skin, it's easy to mobilise populations
Its harder to get Indians to feel the same about china I think, unless they can manufacture a scenario
The only worry is that if Pakistan descends into too much of a chaos, there will be some spillover into India.. like how Afghanistan is to Pakistan.
Even China has scaled back its CPEC as it has realized that it is a sunk cost to invest where leadership is not honest with its population.