Use an IM151-8 for the CPU.
And use ET200S modules for the I/O.
Drop the HMI with "serial communication". Go ethernet all the way. Siemens have some reasonable cost effective "basic" panels from 4", 7", 9" to 12".
So that would be:
CPU IM151-8
Power module.
12 x DI8
Power module
8 x DQ8
Power module
12 x AI2
4 x AQ2
That can fit in one rack, approximately 750 mm wide.