Sorry if I did take it out of context, but even to your main point I still disagree because there are already so many other reasonably harsh deterrents to doping now.
1- Each fighter will be randomly tested 5-6 times a year (2750 tests per year to 500 fighters) on top of whatever the athletic commissions want to administer. The tests are much higher quality than past tests so the chances of getting caught has sky rocketed.
2- Minimum two year suspension for testing positive. Two years for most UFC fighters is 4-6 fights down drain plus the loss of related income, a massive drop in the rankings, and not to mention fines on top of that from potentially both the UFC and the AC who's jurisdiction they fought in.
Had Melendez been caught under the above circumstances alone, he'd probably have to consider retirement. No money from fighting for 2 years for a guy who averaged ~2 fights a year since joining the ufc means he would cost himself at least $800K in lost fight opportunities based on his last reported payout, plus he'd be facing extensive fines from the AC and the UFC on top of this, meaning more money lost. By the time he comes back if he chooses not to retire, he'd be light years away from a title shot, and likely out of the top 20. That's a big hit no matter how you look at it. What fighter would want to follow in those footsteps?
Blackballing the fighter from training with other UFC fighters is just telling him/her to let their skills erode away for 2 years, where retirement becomes an way more likely scenario, and that's assuming this is only their first offense!!! Do you not see how extreme that is?