If the “charitable contribution” is in any way mandatory, the SCOTUS will have no problem calling it a tax. If it is voluntary, the states will see very little revenue from it. If any.
The better option appears to be the employer contribution of the payroll tax. It still has drawbacks; the employer contribution is a cost-shifting measure that increases the cost of employment and still reduces the income to the employee. It will exert a downward pressure on incomes in states that already have very high costs of living.
And what about the self-employed who would have to pick up both?
Also make states like Texas, Florida, and Nevada more appealing to employers.