"...just affects the criminal's future ability to enjoy heroin, and nothing else. He would be exactly the same person in the future, just without any heroin enjoyment"
For a true heroine addict, removing the enjoyment of heroine is not leaving them "exactly the same" and affecting "nothing else", because heroine has become pervasive to who they are. One could argue that it just returns them to their pre-heroine, "good/clean" state, though I am not sure that would be true. But one could also argue that it changes them for the better vs. being an addict, and that's probably true overall (in the heroine case).
But yes, we are talking in different directions. You are saying this one case is okay, I am worried about implications. Like a "gateway" drug, this could be a "gateway" punishment, which is the only reason I am being devil's advocate.