Compelled vaccination — forcing people to endure the pain of a needle and a few hours of feeling sore in their arm — is indeed completely different from locking people up in mental institutions for decades.
This is the CDC site on the history of vaccine incidents: https://www.cdc.gov/vaccinesafety/concerns/concerns-history....
Bad things can and do happen and it doesn’t do any good to pretend they don’t.
Of course the reward is far worth the risk with modern science, but some people are still afraid of shit like this.