If we are talking control systems, then the best bet is to go browse the popular offerings from Schneider or Siemens. Those will be around and supported for a very long time, and you won't be the only idiot out there building a factory with it. You naturally want to update things - that's the whole point of this question - but it is not like you are going to be continuously upgrading the core architecture over the 25 year life. I would not be surprised at all if the same architecture is in place for 25 years at a single installation. Sure, you'll swap out parts and maybe even the controller a few times - but it will all look very familiar to the guy who originally spec'd it, and new people will roll their eyes and laugh at it.
If it is something in IT land, that is out of my field. There are many suggestions on here - but I'm betting that anything popular (Linux, Windows, BSDs, mainframes) will run in emulation going forward. I'd probably avoid Oracle, Apple, or other proprietary hardware - even though I told you to go with proprietary stuff for the factory :)