In the years leading up to the First World War, German society was infused with the idea that diverse problems such as unemployment, urban planning and food supply would be best resolved by getting rid of spare people. This was not a Nazi idea - the Nazis hadn't been invented yet - nor was it particularly controversial; people of most political persuasions agreed on the principle. It was only many years later, in the 1990s, that a generation of young German historians looked back at the documentation and discovered that there had been a widely accepted conceptual infrastructure which was then used by the Nazis; since most people had accepted the idea, the Nazi policies encountered less resistance than they otherwise might have, and found more willing accomplices than they should have. The single best book on this was by Goetz Aly and Susanne Heim, Architects of Annihilation: Auschwitz and the Logic of Destruction, originally published in German as Vordenker der Vernichtung..
Exactly a century later, there is a different rising power which is using similar ideas in formulating policies: China. See for example the idea that if there's congestion or pollution in Beijing the solution must be to deport hundreds of thousands of people.
Now I'm not saying the Chinese are proto-Nazis, though the mainstream German intellectuals of 1911 would mostly have been horrified to hear where they were headed. History never precisely repeats itself, anyway. But nor does it end, or have permanent happy endings, or learn from the past.