It depends on how many and what sort of planets you have. In the end, if you'll be fighting a long war of attrition, you'll definitely want to fill out all leftover slots with trade ports (or, rarely, refineries).
When I get trade in the first place I try to build my starting trade chain using only the default logistics slots, without upgrading. After that I get the (cheapest) logistics upgrade on asteroids, which gives me 2 more slots for trade cheaply. Then I can upgrade a single full-size planet twice, giving me +1 then +2 logistics: after doing that I upgrade my only remaining planets, Deserts, twice again, giving me +1 and then +2 again.
Yes, it's expensive, but you should be scouting your enemy almost continuously to make sure that you'll be able to at least fight them off (build enough ships) if they attack - if you have the spare funds to build trade ports while your fleet is strong enough, go for it!
(Of course if you're in that situation you could also consider attacking if it could give you a significant advantage or a quick win, but usually I'd prefer to max out trade first)