I have a past in optimizing search... And I have suggested a trade network between spaceports... Managing 50 colonies, 300 mines, scattered across space, with point to point transport of freighters is hard.
I had around 500 freighters for some 50 colonies in my latest game. The empire was 7-8 sectors long along the ring of a circle galaxy, which is a bit special shape due to the galaxy type.
Set up main trade hubs along a line. You want items to travel in your trade network. That empire would need 7-8 hubs max. Have 4 large freighters travel between each neighbor pair of hubs. That should be some 30 assigned. They should carry full loads.
Give each colony two medium freighters to travel to and from the hub. Never light on loads. That is 100 medium freighters. Give each colony 4 small freighters to serve nearby mines. To bring full loads to the colony. That is 200 small ones. 200 medium, 200 small, 30 large. And there are still 70 to spare in the 500 current freighters of that empire.
Of course, needs would have to propagate. A colony needs to know what is a shortage (pretty obvious), low level, suitable level, and excess. Or something along that line. When new colony A books its small spaceport, it asks the hub for the missing materials (and everything else it thinks it should need (luxuries). So the hub should know its real stock is lower, and keep track of "stock after subtractions". Which it could in part get from its own "sub colonies", or ask from the next hub. If asking the next hub, treat things the same, have needs propagate. Any freighter travelling a trip, should fill up according to what the destination needs, and what the current station got a surplus of.
If you colonize a loros source, every colony should want some, and ask its hub for it. The hubs have nothing, they should ask in both directions (and make sure it does not reinforce itself), which finally ends up at the "loros" hub giving a huge demand and priority. Two medium freighters (or more if not as locked as above), shuffling the loros there is to the local hub. The large freighters shifting loros along the line of hubs. Mediums picking up and bringing the 124 requested from hub to each colony, along other wares the colony requests...
But in a game of this it is not necessary to optimize the freighters much, you can just balance the game around the inefficiencies, and avoid the worst stupidities. Like it is today, the freighters work, mostly.
A fun effect of this would be feeling a need for bigger space ports at the hubs (more docking bays, faster cargo handling). Large amounts of freighters coming and going. And if the nasty human player comes and conquers a hub? Find a nearby colony to be the new hub, you just lost a rather big store, but there is enough stuff at the other hubs to boost this one quite fast (not to mention the colonies in the area). The hub should not be a giant store, just bigger than average, and where the goods flows through.