While WWI had a very large number of deaths it pales in comparison to WWII. There were ~17 million deaths in WWI but also 17 million deaths just due to the Holocaust (not just Jewish deaths) in WWII, which doesn't include deaths due to military action or Japanese genocide (which, remember, Japan refuses to admit occurred). Total WWII deaths are >100 million, mostly Russian and Chinese (thanks, Imperial Japan and Communist Russia).
The high death toll of WWI was also not due to the machine gun; it had been adopted in warfare long before and well-adjusted to. In fact, the American Civil War showed the world how to incorporate the machine gun. Until they adapted casualties were needlessly high, even for the primitive machine guns of the time. The real culprits in WWI were the large scale, the long time frame coupled with fast mobilization, the nature of trench warfare, and a few ongoing genocides in the Ottoman Empire.