The above-mentioned fabric bags are very practical in this case. Something like that has happened to me before as well, and since then I have always been extremely careful.
The fabric bags are definitely good, nothing at all will happen. Otherwise, just wash by hand, it's not particularly complicated and definitely better than ruining the rest of the laundry.