I've only ever used relays and dimmers on light circuits and smart plugs for mains sockets.
But investigating Shelly Devices more they say they can go behind sockets too.
As well as a safer way to monitor power on things like washing machines and tumble dryers where power draw might be more than a smart plug can handle it's neater.
However not sure how easy it would be to wire in the front facing switch on them.