Before you start consolidating, consider what might happen if the switch is in an unexpected state. For example, someone turned off the heater or pump and you were expecting it to be on.
In other words, you need to consider what a "safe state" is for each thing and how your code, when it fails, reverts to that state. This is an example of "failsafe".
Note that I said "when it fails". This is true for all software, even on mission critical systems.
Source: I write software for a living.
It's mostly for covers and awnings, I don't schedule lights on and off, I enable their motion sensors depending on the time of day, but that's a more complex automation and I wrote it in Node-RED, which to me is a cleaner approach than the automation system in HA.