Pakistani officials are keeping tabs on more than 4 million of their own people through cutting-edge digital surveillance tools bought…