I was a forced labourer during WWII. Will my working periods during and after the war be taken into account for the German pension (even if I was not paid any wages)?

Yes, the German Pension is based on working periods within the current borders of Germany both during and/or after the war. The minimum qualifying period required depends on the current pension agreement between Germany and your country of residence.