When I first started playing DL's, I took the advice of the several guides available, and stayed away from developing farmland beyond "basic" and avoiding bonus farm tiles like the plague. I tried living off of trade which works until.....there are only several civs left and all become your enemies, leaving noone to trade with except minors (and maybe not even those if they are allied to a major).
Then I started paying more attention to the "happiness" TG's, getting a political capital, and securing a morale resource mine whenever possible. This allowed for two things: larger populatons, and higher taxes. After I began praying for planets with a 100% farm bonus tile + a bonus happiness tile (or two), my money problems quickly disappeared.
Unless a planet is of very low PQ with bonus tiles I need to take advantage of (like those 700% factory or research ones), every planet I own gets a Xeno Farm 1, at least. With my least populated planets at the 10b mark, and my most populated ones in the 16-22b range, my taxes alone cover my costs and trade is icing on the cake which I can afford to lose (though I keep my routes viable as long as I can). I have a ratio of one stock market for every 2 factory or research facility. So if a planet has 4 factories and two research facilities, that planet will get 3 stock markets....and if there isn't room to keep that ratio, I make room......
I can keep my planets healthy and happy, with no "unhappy faces" to deal with, even at the 22b mark.