Use a zwave (or equivalent) plug that can monitor loads and detect when the load is below a certain treshold. I have this for my dishwasher, dryer and washing machine. Works like a charm!
See for instance: https://philhawthorne.com/making-dumb-dishwashers-and-washin...