In theory, taxing "externalities" is a very smart idea. Soft drinks are profitable for the folks who make them but cause all sorts of health issues (& chronic diseases). Is it helpful to discourage the use of high-sugar products and alcohol? Yes...except:
If you can travel a short distance and buy the same stuff without paying the tax...it doesn't work. Or if the funds you promise to help the poor don't go to them?