The industry/consulting term is "digital twin". Nothing off the shelf, since every plant is different. Even for a single process it gets complicated really fast. You probably want to track the environment itself too like temperature, humidity, leaks, etc. All the machinery and if they don't have necessary sensors, gotta retrofit them. Oh and human workers too. Stuff like "John Doe pressed a manual override button at 9:25 AM" or "it takes 12 minutes for a forklift operator to move a pallet from zone A to C".
I was involved in a project that made such a twin for a warehouse. It was simpler in theory because there was no manufacturing process. Just moving objects from one place to another. It was still expensive and took a long time. We tracked traffic heatmap but also collected data on and modelled luminosity for safety. On top of that there was a standard warehouse space optimization.
You're going to run into similar problems as with testing and documenting code. Eventually something will change - a process, a machine, a sensor. You have to stay on top of things and update your model too. Otherwise they will drift apart and not be as useful.
It can become really complex. As an example, try to predict resonant frequencies on an entire plant full of rotating equipment. It can be done, but it often requires very expensive equipment and skilled technicians capable of using it to profile a plant. And that's just one potential problem you can run into.
We're often talking about custom plants here, or plants made in very low volume. Making a simulator for that can be prohibitively expensive, since you can't amortize the cost. For particularly important/expensive plants it still sometimes gets done. Though note the simulator might not be able to capture all the nuances of the real world deployment, so it might not be sufficient.
Meanwhile having a separate copy of the plant is also not often viable, once the plants get to any kind of size.
edit: After having 'someone' fact check and remind me: there are quite a number of simulation tools available that can sometimes partially do the work.
The trouble is the simulation tools are either proprietary and thus have only a small mind share among software developers, or academic, and either way, PLC programmers have not gone near them yet.
But a decent LLM should be able to translate the description of a plant to a TLA+ model (or Alloy, or something similar.)
This is starting to be done for very high value plants (think chip fabs, large datacenters, that kind of thing. When the infrastructure is a $10b expense it's worth it).
Small plants in the middle of nowhere, especially municipal ones? You're lucky if it was designed this century and not 50-100 years ago. Everyone's just trying to keep old stuff running at absolute minimum cost.