Yes I've done it.
Firstly don't go cold turkey, it's hell.
Over a month or so, pick one of the snacks and stop that.
Start to crowd in healthier foods. Diverse foods to rebuild gut health.
Then stop another snack. Make sure you replace the calories, or male sure you are eating your TDEE.
Sugar is empty calories, nutritious food is not. The body still needs calories, it doesn't care where from.
Re chocolate, what we crave in chocolate is actually the nutrients especially magnesium. Look up foods rich in these nutrients. I also still have cacao powder on overnight oats. It has no sugar and is the raw cocoa bean crushed into powder so has a chocolate taste but is not sweet. I have that every day and it really stops the craving.
If you do Want sugar have honey, use agave syrup, bake with brown coconut sugar as they are all lower sugar than actual refined sugar.
Finally be prepared to feel slightly depressed for 6 weeks to 3 months, it's fine as long as you exercise and are aware, it goes away!