Michael Huemer is one of my favorite philosophers. His arguments are powerful, cogent, and well-written. In his book The Problem of Political Authority (pp. 331-332), he makes this case that there is a "general tendency for correct ideas to win out in the long run":
At any moment in history, it will be tempting to look around at all the people with bad ideas and conclude that humanity is too irrational and ignorant ever to grasp the important truths. But this is historical myopia. The most salient and important trend that stands out in any study of the intellectual history of the past 2000 years must surely be the gradual accretion of knowledge and the corresponding move from worse ideas to better ideas. The process is of course not monotonic–there are cases of stagnation and regression–but the undeniable difference between humanity’s knowledge today and its knowledge 2000 years ago is staggering. In the short run, the forces of prejudice may outweigh those of rationality. But prejudices can be worn down over time, while the basic truth of a given idea remains intact over the centuries, exerting whatever force it has on the human mind.
Sometimes it is said that, unlike the sciences, fields such as philosophy, ethics, and politics have made little or no progress in the last 2000 years. While the natural sciences have made the most impressive intellectual progress, the dramatic progress that has occurred in philosophical, moral, and political matters can be missed only through a modern lens that filters out all those issues that we no longer consider worth discussing because we have already resolved them. Throughout most of human history, slavery was widely accepted as just. The mass slaughter of foreigners for purposes of capturing land and resources, forcing conformity to one’s own religion, or exacting vengeance for perceived wrongs against one’s ancestors was often viewed with approval, if not glorified. Alexander ‘the Great’ was so called because of his prowess at waging what nearly anyone today would unhesitatingly judge to be unjust and vicious wars. Judicial torture and execution for minor offences was widely accepted. 'Witches’ were burned at stake or drowned. Despotism was the standard form of government, under which people were granted no right to participate in the political process. Even when democracy was at last accepted in some countries, half the adult population was denied any rights of political participation because they were deemed inferior.
When people today say that there is little agreement in ethics and politics, they are ignoring all the issues in the preceding paragraph. For us, none of those issues is worth discussing, since the correct evaluation is intellectually trivial. 'Should we torture someone to extract a confession of witchcraft and then execute her for being a witch?’ This question merits no more than a laugh. But practically speaking, these questions are far from trivial. Slow though it may have been in coming, the current consensus on all these questions represents and enormous advancement from terrible ideas to not-so-terrible ideas.