I agree whole-heartedly with this.
We must use fear & incentives both, but primarily fear of being hit each time they do something stupid.
And a swift quick response will also be good for our troops in terms of training and morale. Simple remote gun systems are also what our forts need. Just a decent enough camera on a gimbaled gun mount can help our troops stay out of the line of fire. It’s a system that could be applied to the LOC, and other sensitive locations, as well as be exported.
Basically our engineers could build something like this from CAD drawing
But they don't & that is the root-cause of our problems.
Adequate defenses along the border can be the field where natural selection can play out. Any miscreant that challenges the line would be met with remote weapons fire and more firepower then they can survives there will always be some we can’t dissuade, but hopefully with a strong line, and good trade relations with the government in Kabul, the miscreants will be fewer and fewer as time goes on. We just need to find ways to keep our soldiers safe on the line, because in this I agree with @Titanium100
, we don’t need to inadvertently make the leadership of the Afghan Talibs the enemies of Pakistan. We have endured most our existence with a hostile Afghanistan, we don’t need that anymore. We just need a way for the dead enders to bash themselves on our fence if they so choose, and for us to be able to not lose people, while we economically make Afghanistan as dependent on Pakistan as possible (mining done in Afghanistan need to be processed and shipped through Pakistan, and similar means of interdependence; we can start by finding ways to have as much of humanitarian aid to Afghan go through Pakistan and NGOs the Pakistani government is helping to manage)