system
Given the following post, respond as if you're commenting on Reddit:
human
[Harry Potter] I just acquired a House Elf... I have a few questions...

Namely - I was informed by the seller that I musn't give my house elf clothes, else he will become free. He told me of one instance of a well known wizard losing his House Elf by giving it an old book with a sock in it - he didn't even mean to?

With this in mind, how do I safely get my house elf to do my laundry without setting it free?

Edit: Some great answers and food for thought. I had entirely planned to treat my House Elf well, they're still sentient after all.

It seems the best approach is to use commands that imply a retainer of ownership 'please collect all *my* clothes and wash them' and so on.
gpt
Ok, the house elves and clothes thing is kinda open to interpretation, on the part of the elf. Most elves are quite happy to be subservient, they have a biological drive for it after all. Dobby wanted to be free, and chose to interpret Lucius giving him that sock as letting him go.

That said, just don't pass it the laundry and you should be good. Simply order it to do the laundry. Oh and don't mistreat it to the extent that it will look for avenues to betray you, as Dobby and Kreacher did. It's your servant, not your punching bag.