The problem: in constants.txt and setup.txt of my new extbase extension I had defined a storagePid and wanted to access this in my controller. But for some reason $this->settings did not contain the storagePid, despite deleting the cache multiple times. My only idea was to include the static template, unfortunately when I tried that, I realized my extension wasn’t even in the list. Why is that?
In ext_tables.php of the extension I added this line:
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'THENAME');
Afterwards (and after deleting the cache yet again), it was finally available.