A small addition: With effect from 1 August 2021, the German legislature has amended copyright law to explicitly mention pastiches.
§ 51a Karikatur, Parodie und Pastiche
Zulässig ist die Vervielfältigung, die Verbreitung und die öffentliche Wiedergabe eines veröffentlichten Werkes zum Zweck der Karikatur, der Parodie und des Pastiches. Die Befugnis nach Satz 1 umfasst die Nutzung einer Abbildung oder sonstigen Vervielfältigung des genutzten Werkes, auch wenn diese selbst durch ein Urheberrecht oder ein verwandtes Schutzrecht geschützt ist.
See: https://www.gesetze-im-internet.de/urhg/__51a.htmlTranslation:
Section 51a Caricature, parody and pastiche
It is permitted to reproduce, distribute and communicate to the public a published work for the purpose of caricature, parody and pastiche. The authorisation under sentence 1 includes the use of an illustration or other reproduction of the work used even if this is itself protected by copyright or a related right.
See: https://www.gesetze-im-internet.de/englisch_urhg/englisch_ur...