How to make archive template work for all terms under a subcategory? (or how to make filter behave properly)

Hello! I think I may have quite unique problem (at least for bricks users, i think). Currently I am working on woocommerce shop page which turned out to be quite complex. Maybe my problem is caused because of my approach to the subject so I will be as precise as possible. We have 2 main categories in this shop, which have many subcategories. Depending on which of those 2 main categories we currently are in different template for header, footer and archive is being used (mainly due to visual reasons). I have set up manually query loops in each of the archive templates that go through subsequent subcategories. They each link to a corresponding category page which uses same template (again, depending on the “main category we are in”). Everything was fine until I tried to set up filters for those archives. For both of main categories we have common taxonomy I wish to filter by (brands from perfect brands for woocommerce plugin). By default when I filter using bricks there is a problem - in the dropdown terms which are irrelevant are being displayed (empty for subcategory we are currently in). Option to hide empty terms doesn’t seem to work. Then I tried different filter plugins and found one that hasn’t had that issue (Pofily). Most if not all of those plugins I tried and the one I mentioned dont filter on the category page but link to a term archive and this is where things get even trickier. I tried most of the template condition combinations that seemed logical, yet I can’t seem to find the right one. I want to:
make an archive template which is being displayed for all child categories of the main one and also include terms

Whenever I filter using plugin I can see in the url that I am still on a category subpage, just at the end of it there is taxonomy listed. So whenever I set condition to display archive for main category nr.1 + all terms(brand) template also starts working for the other main category nr.2 even if it was not selected next to the 1st one. I assume this may be intended and my problem is quite niche.

If you know a way to filter “inside” category page properly or way to set condition (even if it’s more of a manual coded solution) to make template work only for taxonomy under a certain category please let me know. I think this could be possible since filters work properly, picking only products from particular subcategory with given term please let me know!

If you need more details I am happy to share how did I make loops/conditions etc.

English is my second language so I hope this post is not too hectic to read. I will appreciate any insight, thank you in advance!