If war was eventually inevitable, should have struck them when they had the meeting in Kandahar. That would have been less risky and less bloody than right now. What would Taliban do when its whole leadership would be wiped out? That would have ended any possibility of foreign assistance to them on a political level as well. They would have ended fighting each other to take control of the country and Pakistan would be watching from the sidelines while they fight each other.
The top priority for Pakistan should be targeting leadership and playing their internal divisions as much as possible. The groups near the border should be drawn into traps and eliminated.
Taliban hide behind religion while not even implementing the version of Shari’ah Taliban 1.0 had. If they play dirty and support commie bla/blf while trying to act as Imam Mehdi’s army, Pakistan should do what Americans or ex Afghan special forces did. Show them what it means to be a real takfiri and watch Nangarhar and Kunar become their Waziristan. Taliban cannot fight an insurgency.
Afghan front should be won through hybrid war. A mix of covert and overt operations. The bulk of Pakistan’s conventional might should be saved for Indians if they dare to take the opportunity and attack Pakistan.