It isn't either or, it can be a combination.
This would be a classical cost minimization problem which you could try to do in Excel, for example.
Assign a cost for each meter of wire. Assign cost for the labor of routing those wires.
Assign a cost for each module - note it's likely much more than the MCU and CAN transceivers; it needs assembly, programming, testing, casing, etc. It's very hard to produce any "box" for less than maybe $10-$20, no matter how stupidly simple that "box" is, and however small the electronic component BOM cost is.
Then group the IOs in different ways, and find the minimum total cost.
My take is that design a module which has preferably excess IO, than too little. Say, a CAN IO box with 1 IO connector might cost $20 to build (electronics, casing, assembly, testing), but with 10 IO connectors, it's not $200, but maybe just $25.
Now, with excess IO in place but unit cost still as low as it gets, you can decide at install time whether you just leave most IO unused, but if you happen to have a lot of devices there close-by, you do have the IO available without needing to build a horrible spaghetti nest of chained single-IO modules.