Alright. Got it working now after some pulling my hair out.
I used your snipped but encountered some strange behaviour that notifications wouldn’t be added to the database.
In the end I figured out that bp_notifications_add_notification() has an ‘allow_duplicate’ argument which defaults to false.
Learned something new today :’)
Thank you for your help!