not Germany specific, but 'universal jurisdiction' is a thing:
https://cja.org/what-we-do/litigation/legal-strategy/univers...
I can't find much information on this in English, but I believe it was Spain that also put in place an explicit law that you can use Spanish courts for human rights cases that have no very direct link to Spain.