I read a book called SHOULD ALL DRUGS BE LEGALIZED and it's a great read.
There is a model already out there that could work for selling the drug xtc on a licenced premise..such as a night club, and it would mirror how alcohol is currently done there but, crucially, the club WOULD NOT SELL ALCOHOL ( only soft drinks)
i.e. the club would sell xtc pills once you are inside. Your only allowed one at a time and you are not served if you look intoxicated or out of it.
Chill out rooms and access to water would be plenty.
Medical staff given extra training about effects of MDMA. Entry would be really strictly age checked to make sure over 18 or 21 so no fake id rubbish. You also don't get in if you're drunk.