Show subfolder dynamically in library control

Hi, I'm setting up an employee HR portal that will contain confidential personal information.

Set up as follows:
List 1 - contains all employee details
Library 1 - contains documents

My form contains tabs - one tab for List 1 and another tab for Library 1. I'm using the parent lookup to filter the documents in library 1.

I have a Power Automate Flow that sets Item Level permissions on the documents in Library 1. However, in order for a standard user to see Library 1, they need at least read permissions on the entire Library 1.

If for whatever reason, the Flow fails to set item level permissions when a document is uploaded to Library 1, all employees will be able to see that document due to the read permissions as explained above. (the classic fail open problem)

My thought was to manually create subfolders for every employee in Library 1 with the correct user permissions, but how do I show the correct subfolder for every user in my form?

Dear @lzaf,
That's an interesting case... Not sure how exactly you want it setup, but should be doable. For example, in this article a new root folder is created for each item - Show docs from one folder only in List or Library control — SharePoint forms

I think it can be replicated for an individual user as well.

Thanks, was able to get this working using the change root folder dynamically example