Incompetent security apparatus + incompetent political class. Did you see the other day when terrorists attacked an army post for 5 whole hours, killed all the soldiers and then left, while for all that time there was no aerial support?...
Soldiers in outposts don't call for CAS unless they think they need it. And sometimes, by the time they realize they need it, it is too late. You don't always know that you are heavily outnumbered and that the assailants are planning to over-run the post, because it's usually a hit-and-run. Even US outposts in Afghanistan have been looted like this.
What matters is what happens after such incidents and how you deal with them.
The way things are going I fully expect that CPEC projects will be targeted again
Yes they will be. And?
You thought this was going to be easy?
Do you have any idea what this project is up against, strategically? China is challenging the entire 'world-order' led by the US with BRI+CPEC, and the US has enlisted India to sabotage it in this region. They will employ whatever means they can, including funding and weaponizing local insurgents, to sabotage it. And Pakistan will be the one which takes most of the casualties. Ambitious endeavors like this aren't free, they have a cost. So if you can't take the heat, then don't play with fire.