This is absolutely the central question since multiple empires have crashed and burned when attempting to "win in Afghanistan." We need to learn from that history and be wiser in the choice of foreign policy we apply there. I would be in favor of a well-placed intelligence apparatus that can determine when a critical mass of bad actors is attempting to bring plans in to action. Then let the drones fly to scatter them to the four winds of the desert. Apply regularly and vigorously.
What you said should have prevented 9-11. From what I understand, the assets and intelligence were in place and ready to go.