I mean, methadone is a portion-controlled opioid used to treat heroin addiction. It's traditionally meant to be weaned off of, but there are plenty of people that use it their whole life.
It's the equivalent of sitting down with a dietician, making a meal plan, and holding yourself accountable to it. Addiction only ends when the user is willing to commit to the action.