There’s plenty of case law that supports the forced medication of prisoners to varying degrees. It’s not hard to imagine that courts would look favorably on this even if implemented as a condition of probation.
Only for mentally ill people and possibly serial offenders; not for something like a vaccine that has no relationship to criminal conduct.