As for CPEC, I would like to set your mind at ease. Seriously, CPEC is in view is such a massive blessing, I've made a thread or two about it in the past. Haven't said much about financing aspect, I was more focused on the projects in the portfolio.
Let's just take a look at early harvest projects alone. Just under USD20bn worth of projects fall in this category. Of that, there are three forms of financing: a) Loans with sovereign guarantees, b) Commercial loans (private sector), c) Equity/private investment. The breakdown if I recall correctly was USD6bn in sovereign debt, USD~10bn in commercial loans, and a smaller proportion in equity. So total is just around USD20bn, again this number is smaller because we're only counting early harvest projects. Now if I recall correctly, we have >USD100bn in total external debt, that would mean early harvest CPEC sovereign loans only make up a small proportion.
Now here's the real kicker... Do you know what the interest rate on those sovereign guaranteed loans was according to Chinese official sources? 2%, and the repayment period? 20-25 years....
The Chinese could've literally parked that some of that money in UST and their returns would be better. Also, the real concern for us isn't CPEC debt, but as you pointed out the debt owed to western countries and western capital markets institutions in the form multilateral loans. I can't remember what proportion of our forex outflows go on servicing interest/debt on those multilateral loans, but it's huge compared to CPEC loans. Heck even the CPEC commercial loans I mentioned, the ones without sov guarantees, their rates are like 5%.
I know you'd be surprised to hear some of this, there's so much fear-mongering about CPEC. Anyway, on the question of refinancing (should the need ever arise), there are two approaches to looking at this. The hard-nosed market based approach which I believe isn't so relevant, and there's the more specific approach that takes into account political goals/bilateral aims, image building, historic relations between Pakistan, and the internal state of the Chinese economy. Again I don't want to bog this post down with details, but refinancing IMO would not present as big of a hurdle as it seems. Let's put aside where rates are at, our credit risk (sovereign), Chinese required rates, currency risk/swaps, current IBOR/benchmark rates vs prior, terms etc.
In my estimation, it is well within the interests of China to see CPEC succeed and not place excessive debt burdens on Pakistan, besides the money, they've investment far more political capital into their BRI initiatives. If we ever reach a more dire state, want to know what I think we might see happening between us and the Chinese? Refinancing for sure, deferments, changes in terms. We even might end up with some write-offs/debt forgiveness, sure concessions aren't one-sided, but I certainly can't envisage any scenario where the Chinese don't treat us with kid-gloves on this matter. And on the subject, I believe the Chinese have already refinanced tens of billions USD in loans to Angola, Ukraine, Sri Lanka etc. So, need for refinancing CPEC debt isn't there IMO, and even if it was, I think it'd be a lot simpler than what we might conclude ignoring all those other aspects I've alluded to.