I've been using a Win 3.1 box to control the heating and to monitor a few sensors at work for many years now and its never failed, even when the log files filled the disc and when I had to turn on the screen to change the date (leap year and or millenium change). No probs at all, unlike all the 2k, XP, Server2003 and Vista systems which are VERY high maintenance.
I was pretty surprised because I'd thought the computerised systems on trains would be very sophisticated and would need quite a few interfaces with the computer. That got me thinking that the serial ports the old hardware that Windows 3.1 (and the Spectrum???) would run on wouldn't be enough. Moreover, the old operatiing systems wouldn't recognise newer hardware.
Hmm, the process control I/O cards just slot straight into the motherboard and might have dozens or even hundreds of lines coming off them to interface with the sensors, controls and actuators. No need to use the serial ports other than perhaps for remote access to another machine, and that standard hasn't changed in 40 or more years!
What newer hardware would you need to add? Most of it will be the external connections with the process control card.
But if you wanted to, I can't see why you couldn't run Win 3.1 on a new motherboard if the BIOS is doing its job properly. It wouldn't recognise the mains power management features but that's just as well on public transport!