When something has a label on it, it will influence how we think about it, even if the thing isn't what the label says. So I think it's important to define the terms in depth.
Suppose a pharmaceutical product labeled "vaccine" possesses the following characteristics (and ignoring cost):
Probability of seriously harming the recipient, for example death or permanent side-effects.
For standard vaccines (measles, tetanus, etc) this is way below 0.1 per million (0.1 ppm) or 100 parts per billion (100ppb), in fact it is so low that it is very hard to measure.
Probability of the recipient avoiding serious harms caused by the disease, compared to an unvaccinated person.
For rare-ish non-contagious diseases like tetanus, this would be the product of a low probability of catching it in the first place, then a high probability of gruesome death if you catch it.
For smallpox, this would be the product of a very high probability of catching the disease, then a high probability of death.
Note I'm being a bit consequentialist here by neglecting mild temporary side effects of both the product and the disease, or even getting the disease at all if it's mild and temporary... and only focusing on serious permanent consequences).
If the disease is not contagious, then that's it: this risk/benefit calculation only concerns the individual being vaccinated. If one has a fear of needles so acute that they would rather choose the possibility of gruesome death by tetanus instead, it's their problem.
I felt it was important to mention this because the ethics of vaccination are a completely different topic if the disease in question is contagious or not. Both cases really need to be considered separately. Just using the label "vaccine" is inaccurate: "vaccine against polio" and "vaccine against tetanus" are distinct moral objects.
However, in a socialized health care context, one could also discuss both about the moral aspect of the community having to bear the cost of caring for someone sick from tetanus because they didn't take the shot, while not forgetting about the (im)moral aspect of a socialized healthcare system being made mandatory.
If the disease is contagious however, then we have to consider the other "altruistic" aspects:
How much the product prevents transmission of the disease to other people, lumping together "not catching it at all due to immunity" and "mild breakthrough infection but not contagious". If it does not bring transmission down to negligible levels, it is known as a "leaky vaccine"
Let's just call this parameter "leakiness", so it's the opposite of "effective at preventing contagion from the vaccinated to others".
Now you say:
Is it a good rule, that people who wish for a pandemic scenario to end, get vaccinated if they are able to? I fail to understand why that would be a difficult problem?
And that's where things get complicated. I think you say you "fail to understand why that would be a difficult problem" because you are applying your usual definition of "vaccine" to a product with non-usual characteristics. I'm not blaming you, this definition is usually accepted by everyone, so that's the default attitude.
Depending on the value of the parameters outlined above, your "vaccine against contagious disease" moral object again splits into several completely different cases.
I'll make several cases, which will become just two, for simplicity.
1) Negligible serious side effects, highly effective immunity, highly effective against contagion (not leaky)
This is our usual standard vaccines (polio, measles, hepatitis, etc), and in this case, the usual moral philosophy frameworks like utilitarianism and consequentialism would apply, although there would be nitpicking about what "negligible serious side effects" and "highly effective" mean. But there is not much disagreement. Very few people would come to the conclusion that getting polio is a better option than a vaccine.
In fact, as long as the vaccine is not leaky, one could still apply the same philosophical frameworks while varying the balance between side effects and effectivity at preventing severe disease.
For example, consider a utilitarian, a vaccine with high side effects and somewhat low but still decent effectivity, and a disease that is deadly to old people and mostly harmless to the young. The utilitarian will probably conclude that it is okay to mandate the vaccine for the old (since it will result in a substantial reduction in risk of death), but not for kids (since it would not). If you tweak the "side effects" slider to a bit lower, the utilitarian will eventually mandate the vaccine also for the young, on the grounds that a few kids will die of myocarditis, but that will save a lot more old people. Season to taste, depending on how much value your utilitarian assigns to a life depending on age, which can be estimated by asking them how old they are.
This is an actuarial calculation that requires accurate data, both on the side effects side and the effectivity side, which we have for older vaccines, but which we do not have for mRna. Everyone picks the data they want, and it's all over the place. This explains most of the disagreements, but not all.
2) The vaccine is leaky.
Viruses mutate all the time. When an individual who has vaccine-induced antibodies gets infected anyway, mutation variants that still replicate well in the presence of these antibodies will be selected. Thus vaccinated individuals will select for vaccine-resistant variants. This is inevitable.
If the vaccine is not leaky, we don't care because these don't spread. Back to previous cases. If it is leaky, then this has to be split into two sub-cases.
2a) The vaccine is not that leaky, just a little bit, and it's still effective enough, with high coverage, that breakthrough cases can't pass on their vaccine-resistant variants, and the disease isn't that contagious.
That's Hepatitis B. So far, we haven't seen any doomsday Hep B virus. Everything is fine. Again, back to previous cases.
2b) The vaccine is quite leaky, not very effective, and the disease is very contagious.
In this case, the vaccinated evolve vaccine-resistant variants and spread them, and...
2b1) Coverage is low, because we vaccinate only old people at high risk of death.
This reduces the number of people who can evolve vaccine-resistant variants. It also means these variants will spread to the unvaccinated young, where their resistance mutations have no advantage. Younger people, if they got it before, will have antibodies for a different variant. So, virus evolution is constrained either to a "one size fits all" variant, where it has to be somewhat good at infecting people with a wide variety of immune status and antibodies, which reduces the chances it will be extremely effective in everyone... or to a number of circulating variants which will each specialize on particular immune status, but won't be highly effective in everyone. So in practice, morally we're still in the previous cases.
2b2) ...and vaccine coverage is high
I'm sorry this post got this long, but this is where I finally get to answer the question, so hang on!
If mRna vaccine coverage is high, then everyone has antibodies against Covid Classic Spike 2019 edition, which is now an extinct virus. In addition, all the vaccines use the same spike, and only the spike. This results in a population with immune uniformity, where you would want a wide diversity of antibodies to thwart targeted mutations. Since there is no "immune diversity" in the population, the emergence of one single variant that is vaccine-resistant for everyone worldwide becomes possible.
If the vaccine is effective and not leaky, no problem.
If the vaccine is not very effective and leaky, then the evolution and selection of this variant is inevitable, the only question is which path it may follow.
If it follows the ADE (Antibody dependent enhancement) path, then it will specialize so well against the Covid Classic Spike antibodies that it will become a lot more deadly for the vaccinated. This is known as "case nightmare kitty", because in the previous SARS-1 vaccine attempts, all the vaccinated animals died this way. This also happened to the unlucky children in the Dengue vaccine trial. If this occurs, the vaccinated will be in trouble.
It could also follow the Marek path, opting to beat the vaccine with brute force and virulence. Basically, variants that are extra virulent and deadly kill you before you can spread them, so you die BUT... if you are an utilitarian, it will feel good because your virus also dies and it made you so sick you didn't have time to spread it, and that will select the nastier variants out of the virus gene pool. However, if the vaccinated can tolerate deadlier variants that would kill the unvaccinated, and if they can spread them, then the nasty variants will not be selected out, and the virus will evolve to be just as contagious and virulent in the vaccinated, that what it was before in the unvaccinated. This is how a leaky vaccine turned Marek's disease, a virus that previously killed about 5% of chicken, into a doomsday virus which has 100% lethality in unvaccinated chicken, and lets the vaccinated chicken live just long enough to be cooked.
Ironically, the current version of Marek's cannot spread amongst unvaccinated chicken, because they just drop dead too fast. But all the chicken farms everywhere are contaminated, so if you put unvaccinated chicken in them, they will all drop dead. So we will have to vaccinate all chicken, forever.
If this occurs, all the unvaccinated die, and the vaccinated get to enjoy an injection every 6 months for the rest of their lives, then 4 months, then 3, then 2, then a monthly subscription...
Or it could just evolve into a common cold. That would definitely be my favorite. If a variant makes you very sick, you stay home and it spreads less. If it's a milder variant, you go on with your life and spread it more. It is speculated that this is what happened with Coronavirus OC43 during the 1889 pandemic. There is a possibility that Omicron is doing just that, we'll see when more data comes out. In this case, it will be a free contagious vaccine, and if you're a True Utilitarian and you get it, then you will want to spread it to as many people as possible. Indeed, if a harmless variant comes out, one could argue Covid Parties should be a moral obligation, to get everyone infected and immunized in case the next doomsday variant if it ever comes out*.
Anyway, from a moral philosophy aspect, this raises the question of infinite harm. This tends to seize up the utilitarians, because infinite harm with a non zero probability does not compute.
Would it be a good rule for everyone that is able to, to get vaccinated to ensure the maximum utility of everyone involved.
I hope I answered the question.
It is very important to understand that this heavily depends on vaccine parameters outlined above. Nightmare scenarios are only possible if a vaccine is leaky, which is the case for mRna. If a vaccine is non-leaky, safe and effective, then that's a much simpler question, mostly about safety and side effects, and I think this is the question you had in mind.
That's why I also made a moral case for spreading a virus.
Notes:
An immunocompromised individual can stay infected for months while being treated with monoclonal antibodies, which massively speed up virus evolution against these treatments. Should we euthanize them for the Greater Good, so that our treatments remain effective?
Natural infection creates a broad spectrum of antibodies against the whole virus that are much more resistant to variants/mutations than spike-only antibodies. And while variants will also pop up in unvaccinated infected individuals, these people do not have the same immune uniformity as everyone else who was vaccinated with the exact same spike. So they will also evolve variants, and if there are more unvaccinated who get infected they could even evolve more variants than the vaccinated who get it anyway, but it is much less likely that they will evolve the doomsday variant.
Bonus:
How do we know a vaccine is safe and effective?
If a disease is deadly, the effects of a working vaccine are easy to measure.
However, COVID has a knack for generating meaningless data. It is harmless to certain population categories (for example kids have sub-ppm mortality), and quite dangerous to others (very old, or about to die of something else, etc). In addition, going from "severe" to "dead" depends on what care is available/hospital saturation, and care gets better as time passes.
Mortality follows an exponential(age) distribution, which has a huge range. In fact, if a group of 10,000 high-school students gets infected, the overall mortality will almost completely depend on the one unlucky guy with heavy comorbidities in the sample. Likewise, adding one old guy with cancer to that group of 10,000 high-school students would skew the overall mortality by at least a factor of ten.
This opens plenty of opportunities for either cheating or failing at clinical trials with low number of participants: the guy with undiagnosed cancer has a huge influence on the outcome depending if he ends up in the treatment or control group.
In other words, the disease isn't deadly enough to give clear data. Any data that isn't sliced into thin age groups is meaningless, and it's impossible to know if a treatment/vaccine is safe/effective without a large control group.
Mandating vaccination would get rid of the control group, so we would no longer have any way of knowing if the vaccines actually work, or if they are safe. This would not be true for something like Ebola of course, but for Covid, it is.
I would argue that it is unethical (and unscientific) to mandate something, while at the same time getting rid of the way to know if it actually works...