Who contributed the most to the defeat of the German Empire during World War I ?
There was a revolution in the German Empire, which led to proclamation of the Republic.
I don't know if this is a controversial take, but it probably would have been better for the future if the more left-wing Spartacus League which later developed into the KDP won. The SPD betrayed the other left-wing groups and joined with right wing paramilitary groups like Der Stahlhelm so we ended up with the Weimar Republic.
The SPD would later be paralyzed by their strict adherence to legal democratic processes in the face of rising Fascism.
The Communist Party (KDP) hated the SPD because of the SPD betrayal in the revolutions of the 1918-1919. They were seen as collaborators with the right wing, and traitors of the working class.
This split the left in Germany, which contributed greatly to the rise of the Fascists, while the traditional conservative elite of the DNVP thought they could control Adolf Hitler, so they appointed him chancellor (See how that worked out).