or there is a MIDDLEMAN that needs to operate on BOTH WORLDS to rent the container and accept return of the rental [which can then lead to the balance of trade issue where empty containers start to pile up on worlds that import more than they export.]
My presumption is that there will be third party companies ("middlemen" as you cite) that manage the logistics of container mobility on the interplanetary and interstellar scales.
That's right, interplanetary "counts" as well for this, so even if a star system has a "balance of trade" problem where they import more container Boxes than they export, that doesn't necessarily mean that they pile up and remain idle at a starport (in a big heap,
just rusting away) ... because the only and exclusive use for them is interstellar trade. They can be put to use within a single star system for interplanetary shipping, just as easily as is done for interstellar shipping.
Additionally, there is always the opportunity for "one way tickets" for the shipments of specific Boxes, simply because they're "useful" as mobile containers within the destination star system. Think of ore processors and pharmaceutical industrial laboratories (for example). Perhaps the Boxes are useful for the purpose of mobilizing their contents, such as a field hospital or a mobile workshop that can be "delivered" (by small craft lifter) to specific points of interest for in-situ uses.
What about colonization programs, where the entire point and purpose is to deliver more to a destination star system (imports) than would be reasonable to retrieve from it (exports) until the colony is "well established" and self-sustaining (typically, Population: 5+). Container Boxes can provide ready made housing for personnel, on terrestrial surfaces (under atmosphere) or for Belters based in orbits.
My point being that a "symmetrical balance of trade" in/out of specific star systems is not always "ideal" ... let alone a priority. Simply "adding to the pool" of container Boxes within a star system will promote the interplanetary movement of goods (and the associated services), helping to lower transport costs (by increasing supply) in ways that reduce "friction" in the local in-system economic outlook.
My assumption is that Population: 4- mainworlds will almost certainly be running a "trade imbalance" of importing more than they're exporting under most circumstances. The world economy simply isn't diverse and developed enough yet at those population levels and is going to be heavily reliant on imports. The primary export will often times be resources (mineral, vegetable or animal) to at least try and sustain the population while attempting to grow (or otherwise not collapse).
Population: 5-6 worlds are able to extract more resources for export, but they are still reliant on imports. I would expect the balance of trade to be closer to equal, but still a net importer of goods. Non-industrial worlds trade code worlds are primarily concerned with resource extraction to sustain themselves, after all.
Population: 7+ is when the world economy can start shifting its balance of trade towards being more reliant on exports than imports, depending on the trade code classifications. Non-agricultural and Poor worlds will ALWAYS have a demand for agricultural goods from offworld ... while Agricultural and Industrial worlds will ALWAYS have a supply of goods that need to be exported (big picture view).
But again, Traveller is meant to played as a game for the purposes of entertainment ... not as a life (let alone economic) simulator.