I think that's one of the core difficulties with PLC programming. You have to have strong knowledge on traditional science fields like thermal dynamics, material sciences, fluid mechanics, etc., while also understanding the limitations of a 16 bit floating point integer and why overflowing that can be catastrophic.
The system I mentioned in my other post controlled some VFDs, and one would occasionally get stuck running at minimum speed forever instead of turning all the off when it should have. Fortunately the only harm done was a stupid waste of power and and nothing was physically damaged. If it had gotten stuck at maximum speed it might have been a different story.
I'd love to see more formal methods come to the field. Part of me says I'll return one day, maybe if AI kicks me out of my software field, but I'd really want to come back at a position I could healthily influence towards safety and correctness.
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.