@jschwegler First you will need to create some Sharing Groups (Data Permissions > Sharing Groups). They allow you to define and add specific groups of users who can gain access to client accounts.
Once you have Sharing Groups created, you’ll want to build a rule that keys off of your custom permission field you’re referring to from the company object. The rule would ideally pull in the required data and load to your custom field depending on the necessary criteria.
Then, you’d build out sharing rules (Data Permissions > Company > Rule based) that will dynamically assign access to specific accounts based on your Sharing Groups and your custom permission field.
For example, if I have a Sharing Group created for all clients in the “Commercial” segment, and our custom permission field is “Commercial”, the rule would say: Users meeting the following criteria “User Group in “Commercial” get access to the records where [custom permission field] in Commercial.
I hope that makes sense and helps a little!