How to make same repeated texture size on differently sized instances of Box

If you don’t want any deformation whatever the size of each face, it’s getting a lot more complicated.

See for eg:

But it’s always very specific to a cube or a rectangle…