is it is always a bad idea to ear mark a tax for a specific purpose. Especially if you desire to use the tax as a punitive measure to reduce that which you deem bad for society, if it works now you need to come up with the money for the thing you funded elsewhere because all government programs are permanent
Look at smoking, all kind of things were funded on the back of smoking taxes, and when those punitive taxes worked to reduce smoking the revenue dried up but the budgets for for those programs did not so now the money had to come from somewhere else....
Using the tax code to punish or reward behavior is always bad