In your filter functions, why not check for page_id or title – if not available, then just return
Well, ask the WP/BP page lifecycle 😉 Making a hook dependent on a variable that in some stages of the page lifecycle does not exist leads to that some hooks are never fired (e. g. bp_members_directory_order_options or bp_pre_user_query, etc.).
Thanks again for your replies and the offer to help out with the code. I solved the issue yesterday by implementing the custom page independent from BuddyPress as it was a faster, cleaner and more reliable solution.
I created the template by copying and pasting the code of members-loop.php and some of index.php (directory /bp-templates/bp-legacy/buddypress/members) and adapting it for my custom needs. Then I created an empty page in the backend and assigned the template to the page by using the drop-down-menu in the backend. I did not thought that there is something more to do to load the template as it – in principal – works as expected (except the issue that hooks are fired on all member sites now which I want to prevent).
Have you tried checking the page title
Yes, checking the page title also failed as the title is not available in all hooks (same as trying it out with page id).