Control a water heater and ground source heat pump based on cheap hours of spot priced electricity

This sort of control needs quite some planning and it’s even harder to implement it in a generic fashion.
Some big loads you can shut off (like a SG ready charge signal, handing local control to the heat pump), some you cannot (say the oven), but for most of them, it depends on the situation, like an EV. The EMS usually will not know if it can interrupt charging (like today you REALLY need the EV to charge because you need it for a tour while normally you’d just want it to be charged to some 80% throughout the night).
A washing machine you may interrupt depending on time that has passed since start and on personal need when you need it to finish.
Loads are also dynamic in nature: a washing machine or dish washer for example takes ~2kW for some minutes only. Plus all the loads you don’t know and cannot control, like the kitchen devices. That’s really difficult to forecast/schedule.

Also keep in mind it is very challenging to determine a ‘scheduling algorithm’ that also meets people’s life needs. What if your load is ‘optimized’ to 19A and you need to do the cooking ?
If you feel cold or hot or the EV isn’t charged or the washing ain’t done when you expected it to, users (in particular other persons on your household) will be annoyed quickly and start demanding changes from you or manually override things, thwarting your nice optimizations.

Ultimately, the best advice is to really not overengineer things.
(I know since I’m providing a commercial energy management system based on openHAB, see e.g. Looking for energy management system testers and have experimented with that a lot).