The stuff with the random set of preferences looks a lot like ranked choice voting. I think you can use a Condorcet method where the "candidates" are the possible assignments of gifts to people (but an individual's ranking depends only on their gift). It would be interesting to see how White Elephant compares to e.g. the
https://en.wikipedia.org/wiki/Schulze_method. Of course distributing gifts by filling out a preference form of your ranked choices isn't very fun...