Permission to change password only for accounts he is a manager

Hey guys,

I need to create a managed unit with RPA accounts and within that managed unit, give password change permission to users who manage these accounts.
The problem: the person will only be able to change the password of accounts that he is a manager.
Does anyone have any other ideas on how this could be done, even if it's not done through a managed unit?

Thanks in advance.