I used to pink mine but I realized I was losing more fabric pinking them than I was losing to fraying, plus it was extra work so I stopped. I'm too lazy to sew edges and then have to trim that back off.
Gentle cycle definitely helps, as do lingerie bags for little pieces. I think if you combine those two things you'll have a lot less fraying and knotting. You'll still get some, but not as much.
Or, hand-washing is probably best, but I'm too lazy for that.