I would have stopped building ships (unused military production doesn't cost ou a cent) on most worlds. If I was still struggling, I would have begun focusing the production on worlds where there were no ships being built on military production to further reduce my spending (taking away from research and social production). A few economic buildings here and there (generally one on each world, if there's enough space) and then, just sit back and let your taxpaying population grow. It takes a while to level out, but I can usually manage 100% spending after everything gets going.