Those first "automatic" washing machines were a vast improvement over wash women/men doing hospital laundry by hand, just as everyone else did.
All those belts etc, would have been attached to a main power plant which ran on steam. In fact early laundries were called "steam" laundries because power/heating was provided for operation of washing machines, (and later dryers), ironers, and everything else by central steam boilers. There are still many such laundries around, with steam providing the "heat" for heating water inside modern washers as well.