All of these risks existed in the past, but it was more difficult for opposition to organize into a sustained movement, because asynchronous communication was limited by the physics of time and space and the processes of gatekeepers.
The Web brought ease of publishing to anyone, and search engines and social networks brought fast keyword-based and topic-based discovery (sometimes automatically), so like-minded individuals can find themselves quicker than they could before. Your fans can organize fast, but so can your critics.
Having loud critics (or even detractors) isn't a problem in itself. But organized opposition can boycott businesses and make demands involving you that endanger your current livelihood and make it risky for others to work with you in the future. There is an unequal relationship between unproven authors and their publishers, promoters, and others who work with them. An author has a few publishers, but a publisher works with many authors. Given sustained publicity and economic pressure, most publishers will drop an author if keeping them results in harm to the publisher.
This lays bare the fact that authors were never truly free to say what they want to say, because they were frequently dependent on the goodwill, social support, and business support of others. It may appear that in the past, publishers were more principled and didn't cave to sustained loud demands, but it was more difficult to organized sustained loud demands, and various factors made such movements more vulnerable to be dismissed as fringe protests of an upset few instead of the legitimate will of the people.
What changed is the globalization of culture, aided by TV and the web, which made faraway events relevant and remote social movements compatible; the globalization of news enabled by the globalization of culture and aided by the 24/7 news cycle perpetuated by commercial TV news and commercial internet news organizations; and the willingness to people to take direct (in-)action against corporations (i.e. boycotts) that are easy to avoid, in pursuit of a cause framed by like-minded thought leaders as moral.
There is a lot to unpack in all of this. This is why boycotting your electricity company is much harder and significantly more rare than boycotting a publisher or an entertainment studio or some random company that worked with someone you don't like. This is why it seems like things were different in the past.
The fact is, in order to succeed in this changed world, authors must adapt too. Partition writing on different topics and different works by pen names. Self-publish. Market directly. Network with other authors in loose confederations; publish your future works under a new pen name in the same circles. Insulate your personal life from your professional life, and your professional authorships from each other. Reduce your risk that one upset about one thing in one work will wipe your entire life's work.