Actually, to me, you did quite well, considering everything you encountered. Had I been in that situation, I would have had a major binge, so kudos to you!
The best defense though, si a good offense. Prevention is absolutely the key (not that I have the answers, but that's just my opinion).

First, I would recommend not keeping trigger foods or foods that are typically off limits in the house. If you ever plan a "cheat" meal, then just purchase portion controlled items so a single serving bag of chips would be an example. Not as exciting, I know, but that way, you wouldn't have even had the 20 chips to begin with. Another idea is to not even bring those foods into the house at all, if possible. Have a higher calorie meal out. People who do this will have ice cream at an ice cream shop so they pay more for a serving, but they don't bring it into their home.
Hunger is another good preventative. Always have some emergency food in your bag (I need to do this more too). Keep an apple or protein bar in every purse or never leave home without one (much like an American Express card)

. Even if people judge you for it or try to peer pressure you into joining in the fun of their feast, it doesn't matter because the next day, you will feel so much better for resisting and not giving into their pressure.
Gum is another one that is in my arsenal of tricks and tends to work well for me. That way, while everyone is chewing, I am too so I don't feel quite as deprived.
Hot tea or hot lemon water. Most people have this in their homes so you could ask for it and sometimes, I'll go as far as to say that I'm not feeling too hot and could I have some hot water with lemon or some herbal tea. That way, they lay off the pressure of forcing me to eat a bunch of calories and I can even whip out my protein bar and eat that. Once home, I can have my actual dinner or another snack and be done with it.
Binges to happen for me still, but some of the above has helped. Finally, I'll say the last thing that has helped me immensely lately (although this could be a honeymoon phase, which I've had before with other diet "revelations." IF or Intermittent Fasting. I stop eating at 8 pm and I don't start eating until noon the next day. Sometimes I stop earlier or start earlier so I'll have between 14-16 hours of no food. I do have lemon water and tea. This saves me lots of calories and over time, becomes easier and easier. It's not something I could have done in the beginning of my weight loss, but I'm finding it quite easy and liberating at this time. Just thought I'd throw that out there, in case that it helps anyone reading this.
Sorry this is so long! I'm so glad you didn't go too far off the path.