You behave as though the costs for upgrading your weapons and the costs for fielding a larger fleet are similar, though. Nothing could be further from the truth. Your first hull upgrade takes all of one lab and 400 credits and 25 crystal. Compare that to the HUGE cost of building 150 supply in ships.
Well, that's not really a cost for cost comparisson, but even so: if you're having to choose between doing a bunch of upgrade research v's popping up and building a fleet then building a fleet is far superior. If you can't manage to fill your pop cap with ships due to cashflow then you're doing something wrong.
If, OTOH, you do want to compare cost-for-cost: lab is 750/60/80 and first research is 400/0/25 = 1150/60/105. Let's say you can get 50 credits for your minerals: 1200C. Light frigates cost 300/55/0; let's call it 300C for simplicity. 1200C is 4 light frigates! With a supply cost of 5 it means your face-off is (assuming no scouts):
10 frigates v 6 upgraded frigates
If we round your 5% hull upgrade up it equates 10 v 7
I can't remember how much the second upgrade costs, so let's say it costs the same: 400C ~= 1 frigate. Now you're at 5 ships, with 10% gain, which is 0.5. Even kindly rounding up this takes it to 10 v 6, which is worse than at 1 upgrade. And from there on out you need more labs, so the cost difference only gets worse.
An argument for upgrading early is the time involved. While ships are far more valuable early on, if you leave it too late to start upgrading it will take you an absolute age to get to the higher tier upgrades. For example, if you want to get the planet killer as tec and you haven't done any LRM research, you're going to be a long way behind an opponent who has. For this reason it's a good idea to grab research whenever you can. Early on your build-rate for ships is limited by build speed more than economy, so throw any spare cash into getting upgrades. Popping up the second time is more daunting than the first, especially if you've been busy attacking the enemy and haven't taken as many planets as you did for the first fleet cap increase, so you should consider doing some upgrades once you've maxed out ships at 250 cap, while you capture another couple of planets / wait for pop/metal/crystal research to complete.
tl/dr; if you have to choose between ships and upgrades then always pick ships, but you should still try to pick up upgrades whenever you can.