The costs could be as you say. And a arduino may last 25 years but a cheap power adapter janky wiring soldered to a hobbyist proximity switch will not.
I was thinking more of a scenario where a young engineer at least knows what a PLC is and buys $1k of stuff from automation direct. And starting from a PLC/googling about PLCs will lead you down a path of PLC cabinets, high quality power supplies, labeled wires and industrial limit switches. Vs another engineer that only knows the world of arduino and messes of wires in boxes.
In the first case, when he or she leaves and the thing breaks down, the next person can either call or pro or have a chance to connect to the PLC, do some troubleshooting with the ladder logic and figure out which sensor needs to be replaced. In the second case there’s probably no documentation and the source code is long gone so the only thing to do is scrap it and start over, probably incurring a large cost because now it’s an emergency to get the thing working again, and/or it causes lost production. I failed to mention earlier I wasn’t just talking about the cost of parts.
I’m not saying the imax solution may be so bad in the “arduino direction”, but thinking about it for me thinking about some professional experiences I’ve seen in both directions.
In my experience, hacked together arduino projects easily exceed a 25 year MTBF (if you exclude day-1 failures because someone did something stupid like wiring it backwards).
However, ESP32's do not (they seem to require a power cycle every few months - and in my view, that is a failure). R Pi's certainly do not (they require human attention for software updates, which IMO is also a failure - and even if you don't update them, there is almost certainly some tiny memory leak and it'll need a reboot in a year or two anyway).
Arduino cost = $10 for hardware, and a few hours of amateur coding, and an expectation of a 25 year lifespan as long as no changes are needed.
PLC cost is $15k for the hardware, and $10k to hire an expert to code it, who probably forces you into a $10k/year maintenance contract.