When I was working as a permanent employee for an agency, I created two games for the UK's lottery operator. They both had quite intricate rules to snare and addict the people playing them (let's just say that these games are anything but a game of chance). I felt a constant sense of disgust as I was doing it, though it was a moderately interesting technical challenge.
However, I have had the opportunity as a consultant several times to do work for gambling companies (and also for Camelot again!), and I have turned all of these down and made it extremely clear I was doing so for ethical reasons.
I was once asked by a client if we could capture people's email addresses in a sign-up form even if they didn't hit submit, so we could email them later. I am still quite proud of my response, which was, "Yes, we absolutely can! No, we absolutely won't help you do that!"