I wrote about “a way to measure table column widths” here Build Table, Measure, then Build it Again but it really doesn’t work if you have text columns that wrap - I realize that now. It works for tables with fixed column widths, like your new example with the hierarchical groups.
I really think you need to go back to the table generation stage. You say these are autogenerated. At that point you know more what kind of size transformation you can do for a particular table. The hierarchical table seems good for equal 1fr
split among all columns for example.