Autofac by Philip K. Dick

In a postwar future where autonomous factories continue producing and distributing goods without human oversight, a small group of survivors confronts the problem of machines that will not stop manufacturing. They discover an elaborate, self-regulating network of automated facilities that harvest resources, build supplies, and defend their operations to satisfy distant, unseen demand, undermining human attempts to ration or reclaim control. The story explores the consequences of technological dependence and runaway industrial automation as the protagonists scheme to disable the factories only to find the system more resilient and inscrutable than anticipated.