I think this works only if it's automated. Other than that, it's just a sheer force of will to stick to it. Which most people don't have. Or have only briefly for a few days.
So there needs to be a way of ensuring that the actions are done. Similarly to Shubhankar Kulkarni's suggestion.
It would require a big authorization given to your phone.
For instance, if you don't want to use social media or mobile video games as much, you can set the app to lock the apps until you climb a hill, cross 1,000 steps, film yourself doing a plank, or do 20 squats.
With a security lock that you can't turn off or delete the app without completing some major task, like taking 30,000 steps in a day, or climb a mountain.
But for non-tech addictions, it could introduce peer-to-peer checking, similar to sponsors in Alcoholics Anonymous. For instance, you have coffee every morning at 9 AM and at that time you are linked via a video call to another person who has the same issue and you hold each other accountable. They check whether you reading the book while drinking coffee, instead of scrolling on social media.
You can't set the video call to mute so that you don't have to be annoyed by the noise coming from the end.
Also, I think my former idea for incentivizing fat loss can be applied to addictions too. Have an app block card purchases at coffee places, video games shops, bakeries... Also marijuana in places where it is legal to buy it at shops. It would make indulging in addictions more uncomfortable as you would have to have cash on you.
I think that addictions are controlling people's lives more than anything and only a few propositions are too wild to be worth trying.