//The companies can't switch your power off without a court order.//
Only if they need to gain entry to effect the disconnection, barry (which, if you don't have a smart meter, they probably will). But no court order is required to disconnect supply, per se. In this respect smart meter customers are worse off than those with conventional meters because no entry warrant is required to secure disconnection.
However, disconnection (whether done either remotely via a smart meter or directly by entering the customer's premises) cannot be done unless the supplier complies with the conditions of its Energy Supply Licence. These set out clearly what the supplier has to do by way of engaging with the customer and providing the required warnings and notice if disconnection (or the provision of a pre-payment meter) is necessary.
A court order is only needed if entry is required and the customer refuses access and, as above, it certainly isn't required to impose blanket cuts when supplies are in jeopardy. This is more or less a given because successive governments have presided over the abandonment of the country's energy security, depending too much on unreliable imported energy and on sources which supply nothing when the wind doesn't blow and the sun doesn't shine.