No, the politicians who created the systems of government that led to genocides did not contribute anything positive to society. The scientists who created things that aided in those genocides also did not contribute anything positive because all of the things they created in the name of murder were used for murder.
Did some scientists exist in that time period that contributed to society, yes, did the existence of these empires make it more likely that they created that technology? Who knows, I mean maybe Hitler chose to fund a truly good scientist that the previous system might not have, but maybe a Jewish scientist living in Poland that they killed might have invented the same technology if they hadn't invaded and killed them.
There are very few advances in all of human history that were suddenly revolutionary. Just because one person often gets to publish the results first, doesn't mean they even had anything to do with the invention, much less helped it along. Just look as Edison or Ford as an example. They were no different than Musk and what little he himself contributed, we just have a lot more documentation and it's harder for Musk to hide behind his company than Ford or Edison. Almost all technology is incremental and it's much more likely that all the money spent on developing weapons during that time period would have been used to develop positive things that would have advanced civilization faster and for the better. Not to mention all of the money spent to fight and then recover from those wars. And even more so all of the brilliant people who were killed in the name of those wars whether as part of the genocide or by being drafted into the military or departments responsible for genocide.
Any minor beneficial gains would have been gotten much more cheaply and quickly by spending on civilian than military research even if that military research might have eventually been used to become civilian technology.