That's a bit relieving to hear, but I can't help but feel like there's no way that can be right; if I were managing my economy properly, surely I wouldn't be always at risk of plummeting into the red.
Actually no, if you're running your economy efficiently you won't have much surplus in many of the goods, at least until you get into a mid-game economy.
To a first approximation, the purpose of the economy is to produce the two resources that ultimately decide games: science and alloys. (You also need surplus minerals to keep building infrastructure, and you do want some admin cap and unity as well, but let's keep it simple.) You need to decide how many of your pops to turn into researchers and metallurgists: it's not a free choice given limited building slots, mineral costs, build time and so on, but you do eventually decide. If you don't make very many, you'll have a slack economy where basic goods are abundant; if you make more, your economy will get tighter, first because your researchers and metallurgists are eating up input resources, and second because you've effectively pulled them off making those resources. Don't worry too much about the details of which of energy/minerals/food/CGs/gases/crystals/motes to make more of, as the market can sort out any minor imbalances here and there, but do pay close attention to how tight your economy is overall.
Having a slack economy feels good in the short term, and it's good for absorbing unexpected costs; but in the medium term, underinvestment in tech/alloys bad because you have less tech and/or you are less prepared for war. Tech, among other things, vastly increases the power and efficiency of your economy, so you have to see all those researchers as an economic investment, even if right now they are chewing up CGs and building slots. As for alloys/fleets, the actual use of them is quite intermittent, but when you do need a fleet, your whole game can hinge on whether or not that fleet is good enough to win the war. This is obviously true defensively: you need to do enough to avoid getting conquered. Offensively though as well, as things are now, Stellaris strongly rewards conquest, since once you win the war, the difficulties of integrating a bunch of alien colonies are limited and temporary compared to the lasting benefit of having more pops, colonies and space resources.
Overall, how tight you run your economy is a matter of experience. If you're a real beginner, you may not want to push it too hard (and play on easy settings so you can do this without getting attacked). More experienced players though run much tighter economies, to the point of being unsustainable on paper (e.g. propping everything up by selling minor artifacts, which are obviously a one-off windfall income), but the point is that it becomes sustainable when all that heavy investment in tech starts to pay off and/or they use the fleet to conquer enough stuff to keep it all going.