Sergio, thanks for your answer.
Unfortunately I am not able to connect your input with my problem.
It is true that I can establish a "debug" region with markup regions, but what should I display there? The problem is the inclusion of my "_init.php", which defines standard values for all markup regions, as-is, into the output sent to the browser before the actual 404 page.
The _init.php contents seems still to be in the output buffer when the correct 404 page markup is added to it.
Here is what I see when I look at the page source in my browser (commented, redacted and shortened):
[source starts with original contents of my _init.php]
<!-- Content for default markup regions available on all pages ==== -->
<!-- Page title -->
<!-- Styles -->
<link pw-replace="page_styles" rel="stylesheet" type="text/css" href="/bmw/site/templates/styles/main.css">
[... more original contents from _init.php follows ... we tune in again right before the end of _init.php ...]
<a href="/bmw/datenschutz/">Datenschutz</a> /
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=3.0, user-scalable=1">
<meta name="description" content="" />
<title>404 Page | bildungsverein.de</title>
<link rel="stylesheet" type="text/css" href="/bmw/site/templates/styles/main.css">
[... bingo, after _init.php the correct page starts....]
As you can see, _init.php is sent to the browser unmodified although its contents should never have been sent. After it, the correct 404 page follows. The 404 page is the contents of my _main.php, filled with information from the 404 page template, and using default values from _init.php.
Please advise how to debug this. Thank you.