I've used embedded linux systems for industrial control systems many times. In those applications, as you mention, we integrated with a PLC for life-safety systems or another control system via contact closures. We ran python for most of our on-board system level software and some networking related services. No way in hell would I have used our output relays to do things like close a flood gate.