In terms of resources expended to move the cargo, it is extremely efficient. Relying on a slower paire of ships to guide the "freight cars" to their destinations, the cars themselves would be cheap, barely hulls with minimal systems. Full starships are much more complicated because of the environmental systems and supplies needed for the crews.Depends what you want, you kind of showed the options you have here, it could be some cheap, unarmed civillian tug pulling a train of cargo containers that just needs disabling like most transports do, though unlike those ships that need to be kept intact in order to get the cargo, a train can just be blown off the front then the pirates can move in and scoop up the cargo or even attach their own tug.
Well within one's borders, it would be a viable option. There is also historical precedent for armored and armed trains.
Or the other end of the scale, a massive, thickly armoured train with destroyer class weaponry on it right the way down the train. Additionally in a long train some of the carriages could open up to release fighters. Or swarms of missiles...
A train could have a problem in that it could have engines at the back burning carriages behind. Colony Wars has engine wash and cargo transports with trains of cargo. The game also has tractor beams, so that's how the issue was solved there, the tractor beams connected the cargo and the cargo was far enough back to not suffer from engine wash.