For non-synthetic races, unrest is strongly affected by the tax rate. I think distance from the homeworld and planet quality also factor in, but I'm not completely sure about those. But you can decrease your unrest by decreasing your tax rate.
Yes I always operate at a deficit in the opening with the tax rate near zero and make up the shortfall through anomalies and more important selling techs to the other races - which I admittedly make much easier by disabling tech brokering.
In the middlegame, the best morale boosting effect is achieved by Virtual Vacation- which is unlocked by Interstellar Trade. With this in place you can often go to 75% tax or more without upsetting the darlings at all.