Perhaps, I'm really not sure how often would that happen though.
I actually think the analogy is a relatively good one. Parallels also also run for the question of how much "paternalism" do we want (the limits of "for-your-own-good" argument). Interests of insurance providers (whether social or private) is also involved in both cases.
In the case of vaccines, immunocompromised people's health is also a consideration. And there is the issue of side-effects, especially for young people. And there is "bodily autonomy". And the stress on healthcare system, etc.
I think there could reasonable discussion about these issues. However, the sad reality is that things quickly get reduced to repeating trite "rallying cries".