Your taxes do NOT fund most pensions.
I’m a teacher in NY. My pension plan is self funded by our membership (teachers). Taxpayer dollars account for the annual school budget (you vote on!) which does include salary and employer healthcare contribution however it also pays for grounds and buildings, transportation, extracurriculars, etc...
Additionally, the current tier 6 of NY state workers pays a “retirement fee” into their retirement which is how the TRS in NY is funded. This fee is not a % of salary, it is an annual fee spread over pay periods.
So just to debunk one point, most public worker retirement funds are self funded by members.