Outcompeting the AI doesn't really mean much in 2.2. On research for instance, your one-planet empire is never going to keep up with an empire that has +100% tech costs but has a fully-developed tech-world (makes about 1K science points of each kind per month). Bearing in mind how much empire sprawl +100% tech costs represents, a full tech-world with level 3 buildings is not even all that expensive for an empire of that size. The reality of 2.2 is that as you colonize more planets and fill them up, your economic power grows much faster than the costs do.
On specializing your economy though, I half-agree. It's not ideal to fall short in lots of things at once, as you end up having to do some specific trades with the AI (which tend to fall through because the AI can't afford the trade any more) or get stung by the market fee if you're exchanging things via energy. I don't think deliberately specializing your entire empire to one resource is a good way to go (specialized planets, yes, but you give different planets different specializations); in particular, you don't want to reject too many raw deposits in favour of spamming city districts everywhere. It's tempting to invest very heavily in alloys, because the AI is so bad at making alloys and so enthusiastic about spamming corvettes that the market price sometimes goes very high; but if you do it on a large enough scale, you will eventually crash the alloy price, and then your whole economy is unsustainable. It's good to sell surplus alloys for a boost when the price is high and you don't need a bigger fleet, but not good if you're having to constantly sell alloys just to maintain the economy.
On the other hand, you will naturally have a bias in your raw goods production based on your homeworld type (hot -> energy, cold -> minerals, wet -> food), which could be enhanced by civics such as Mining Guilds or Agrarian Idyll. The market means you can go along with this bias rather than trying to fight it: you can just sell the excess food/minerals, or use the excess energy to buy things, and it all levels out. Later in the game, you will colonize other types of planets and have enough of all the raw resources.
I haven't built a single energy district in my current game. The only ones I have were taken off the AI. So long as the sale price of minerals/food remains close to 1 there is no reason to get technician jobs. When it is regularly above 1, then energy districts are objectively harmful.
I'd phrase it a bit differently: in the long run, minerals become the key bottleneck, so you want to exploit as many mineral districts as possible (food is debatable, as its market price tends to be pretty low, and beyond a certain level it simply isn't that useful a resource to be stockpiling); if you can build it, the Matter Decompressor is generally better than the Dyson Sphere. But there will still be hot, windy planets with a lot of energy districts and not much else; surely in those places you would build generator districts, rather than just ignoring the deposits and building nothing but city districts.