I’ve never thought to wash anything in my washing machine other than clothes, but I suppose a laundry bag can make it possible to clean so much more, including small lego pieces! You could also use this concept in the dishwasher.
Green Apple Cleaning