You can refer to the powershell in the article below:
To change access request Emails of all sites in a site collection or tenant：
SharePoint Online: PowerShell to Change Access Request Email for All Sites
To disable access request, simply clear the Email value.
Microsoft provides third-party contact information to help you find technical ...
Just like willman said, use a script like the one below will clear all files in recycle bin.
$userCredential = Get-Credential -UserName $adminUPN -Message "Type the password."
Connect-PnPOnline -Url <https://tenant-my.sharepoint.com/personal/username account> -Credentials $userCredential
Clear-PnPRecycleBinItem -All -force
Clear-PnPRecycleBinItem with the Identity parameter set will delete a single specific item from the recycle bin (documentation here), and the -All parameter will delete all the items in the current site collection's recycle bin.
So assuming your script is running under a user account with the correct privileges, it should be able to connect-pnponline with ...
I'm posting an additional option for people that wish to use a no-code solution to this issue.
If you wish to use managed metadata fields for other purposes, you'll need to convert/copy the values to a new field. Please read my post here which shows how to convert the values to a Single Line of Text field, by using a simple Sharepoint Designer workflow.