Try changing:
'parent_url' => $bp->loggedin_user->domain . $bp->slug . "https://wordpress.stackexchange.com/",
'parent_slug' => $bp->slug
to:
'parent_url' => $bp->displayed_user->domain,
'parent_slug' => $bp->profile->slug,
If you add another nav item, be sure to adjust all the fields and add new functions to handle the display.