userDelegationWebApp
Manage Gmail Delegates in a web app - List, Add & Remove delegates
Copy this template to get a copy of the Google Apps Script.
Or create your own script and copy-paste all the code into the necessary files.
Then read How to make it work.
Use the userDelegation web app to list, add and remove delegates.
Add inbox account to list delegates.
Add a user in the right input field to which you wish to Add or Remove access to the inbox.
Then press the relevant action button.
The result of each action will be shown on the bottom half of the page.
How to make it work - Yes, this is absolutely necessary to do first.
secrets.gs needs secrets from a service account with domain wide access to the necessary scopes.
Read the wiki how you set that up.
The secrets.gs in the repo will never have any secrets, as that would give any user acess to my domain. Which is why you also shouldn't post your secrets publicly, and only give access to this web app to trusted admins. Even if that's a given, it never hurts to remind people. :-)
The web app has built-in checks to restrict access to only a specified user, and when using a password in the URL.
tl;dr - No data is sent anywhere, except between you and Google.