Have found my mistake, and have actually described it in my question: You cannot call ap_add_output_filter in the translate_name hook. That must happen after the handler /generator was called. So I defined the insert_filter hook and use a flag in the request config to decide wether to add the filter o not. That flag is set at the place where ap_add_output_filter was called before in the translate name hook.
Thank you all for bearing with me :) Jan Schukat
