As a general legal principle the power company can turn the power off whenever they want. It depends on local law but by and large they aren’t liable for anything.
What you will sometimes see is a discounted supply which is a secondary supply to the premises. The secondary discounted supply is intermittent in some way. It goes on and off on a timer or is controlled by the power company, reflecting the wholesale price of electricity. This is intended to be suitable for large air con and heating loads.
What you connect to this needs to be certified by the electricity company however. They don’t want you to run your appliances off the cheap supply then switch them over to the full price supply when the cheap supply knocks off.
It is important to understand that the wholesale price of electricity at certain times of day is incredibly expensive, but at other times it is incredibly cheap. If 10 percent of the consumption could be shifted it would make a big difference to efficiency and infrastructural cost.