link the stroke width via expressions to the scale of the precomp in the outer comp.
E.g. apply this to the stroke width:
let s = comp(“outer comp name”).layer(thisComp.name).transform.scale;
100/s[0] * value
replace “outer comp name” with the name of the comp that contains the precomp. As the scale increases the stroke width will decrease, for example if the scale (represented by the variable s) is 200 then 100/s will equal 0.5, and conversely if the scale is 50 the 100/s = 2. Note that this will cause errors if the scale goes to zero, so you could add a try() to catch the error e.g., this will clamp it to 1000 × the current value
let s = comp(“outer comp name”).layer(thisComp.name).transform.scale;
try {
Math.min(100/s[0], 1000) * value;
} catch (err){
1000 * value
}