If you have a research advantage over the AI, there's an easy way to secure funding to buy ships/upgrade them. Sell the other civs your obsolete weapons techs, logistics, propulsion and anything else you want to spare. If you have nine enemies on a huge map, you can make an enourmous amount without giving your opponents a measurable advantage.
I've made 100,000cr in a turn using this strategy. I turned around, doubled my military rating and conquered three other civs within about twenty turns. The stategy is also useful in the beginning if you're running a huge deficit.
Another strategy. Some games I become an arms dealer. If your at peace and don't need the military, build advanced ships (somewhat less then your best) and sell them to the AI. If you're far enough ahead they'll pay through the nose for them. You can suck them dry of both credits and influence points. And when you feel like it, you can turn around and bribe them to go to war with each other- so you can later pick up the pieces.
Note that I always put an enourmous priority on research over production. What usually happens is by mid-game I have two/three production worlds building the bulk of my fleet with the rest devoted to research. Small worlds (say class seven or less) or devoted to economy.