I like PLCs a bit more since they're dead simple to program and designed to handle a harsher environment than the RPi. They also have a whole host of I/O options and everything in industrial automation is standardized(-ish) so that you can interop between vendors for their different specialties.
One of the most fun part of the project was running the whole thing from solar, we have irrigation water so I build a neat little PID controller in the PLC that runs to a hefty Solid State Relay connected to a RV water pump with variable speed/flow. If you bypass the pressure relay, put in an appropriately sized flyback diode and use the SSR to do PWM it works quite well. It's no 3-phase VFD that you find on well pumps but it's held up well over the last year(and gave me an excuse to get a cheap hand-held scope to verify I had the flyback diode sized correctly).
[1] https://www.automationdirect.com/adc/shopping/catalog/progra...