Some people load over a 100 balls into their washing machines and run the machine as if they were washing clothes.
This is an effective way to clean multiple golf balls without having to manually wipe or scrub them with a towel or cloth. It is okay to let the balls sit loose in the machine.
If this method doesn’t get everything off the balls then try rubbing them after. The dirty particles certainly should have been loosened post-wash.
Other golfers load them into their dishwashers. If the drum of the machine is cheaply made, the repetitiveness of the balls hitting it could damage it. Using these methods will not damage the balls.
Below is an example of someone using a washing machine to clean balls.