Barring a dramatic turn of fortune, Chinese leader Xi Jinping will stride into Beijing’s Great Hall of the People this fall to claim a third term in office—a likely prelude to life tenure. This new phase in Mr. Xi’s rule will bring fresh scrutiny to one of his grandest ambitions: the creation of a new type of modern government, powered by data and mass digital surveillance, that can rival democracy globally.

As it amasses ever more data on the movements and habits of its people and develops new ways to process it, China’s Communist Party dangles the promise of a perfectly engineered society: one in which artificial intelligence companies work hand in glove with police to track down fugitives, find abducted children and publicly shame jaywalkers; in which public services, rewards for good deeds and punishments for misbehavior are all delivered with mathematical precision and efficiency.