It sounds like you're over-complicating things - if you use SharePoint/Teams instead, you can design out the need to micromanage permissions via a script at upload. It'll also keep the data available to your colleagues if/when you leave the business. OneDrive is an excellent tool but, to the man with a hammer, everything looks like a nail.