Windows XP? Thats modern compared to the actual hardware these things tend to be driving. My contracting side-hustle regularly encounters 8051 for various feeding systems.
For resilience don't connect any Windows operating system online. Regardless of age. Fight the compulsion, glue up the ethernet ports. Just. Don't. Do. It. No matter how stupid your requirements are. Once you have reached this enlightenment, even Windows 3.1 is a fine choice**.
(**That is Windows 3.1, *not* WfW 3.1! The added ram wasted by the network stack is completely pointless when... we have already agreed to not connect it online)
(***LAN is fine)