Wow. Roughly 1 in 50 million if my calculations are correct!
That's an unbelievable situation. I have seen 3 players having trips but 4 players having trips is really rare. Luckily, the flop wasn't J86, although it will make it more fun because KK also have to call and when K appears on turn or river. That will make this situation super incredible.
Your odds preflop of hitting a set are roughly 15% and your odds of smacking that river were about 5%.
Don't worry about end results - making correct folds at the correct times saves us more money than fishing for hopes and dreams.
You are right, this s the correct way to play the hand, nothing to think about this hand.
Good luck!