Criminal responsibility
A person's dementia is not a general reason for his or her diminished responsibility. As with other reasons for a possible diminished responsibility, Sections 20-21 StGB provide for a case-specific analysis in proceedings against persons suffering from dementia that aims to assess whether there are reasons for reduced or annulled criminal responsibility. In this context, a psychiatric assessment is carried out to determine whether the person's capacity for reasoning or control is impaired. If this is affirmed in the respective individual case of a person suffering from dementia as a consequence of the illness, this can influence the interpretation of criminal responsibility.
See for the relevant legal regulations:
Deutsches Strafgesetzbuch (StGB) (Bundesgesetzblatt 1998 I, S. 3322) [German Criminal Code]. Basic principles of criminal liability. https://www.gesetze-im-internet.de/englisch_stgb/englisch_stgb.html#p0127
Further Information:
Gertz, H.-J. (2015). Demenz, Wahn und bloßes Altsein: Regeln und Besonderheiten der Schuldfähigkeitsbegutachtung älterer Straftäter. In F. Kunz & H.-J. Gertz (Eds.), Straffälligkeit älterer Menschen. Interdisziplinäre Beiträge aus Forschung und Praxis (S. 167–192). Springer, https://doi.org/10.1007/978-3-662-47047-3 (see esp. p.180)