Your issue seems a fairly complex one. It is not entirely clear from your description what the situation is.
It probably would take a few hours to suss out the issue and solve it. Unfortunately, I’m not in the position to do unpaid work, but if you want to engage me to solve the problem, you can reach out to me at eric@ericwhite.com