The ideal size for unity is definitely 1 planet. The cost per tradition is increased by 2 per pop, but that's scaled out of relevance by the vast penalty per researched tradition. However. Dear lovely Stellaris has the empire-unique buildings of Ministry of Benevolence, Ministry of Culture, and Psi Corps, plus to a lesser degree Auto-Curating Vault, Empire-Capital Complex, Art Monuments (x5 rather than unique, I know), and leviathan trophies. It's true that once you have all the upgraded and extra unity-production buildings (preferably manned by propaganda synths for that sweet, sweet +35% unity bonus) you'll be getting about 30% of the capital's production per additional planet... but you need a lot of research and unity to get there. For most of the early game, additional colonies will be producing significantly less than the 20-25% penalty.
On the side of tech, you forget a lovely Stellaris quirk: you often will be getting far, far less research from your planets than from orbital resources. So with research, being optimal isn't producing more than 10% of the capital's research output per new colony (which is easy) - it's producing more than 10% of the capital's output and 10% of the orbital output (which is typically impossible). Additionally, you're incurring a 1% penalty to research per empire pop over 10, so while a max-pop capital is getting hit for 6-10% or so, each additional colony incurs 10-25% pop penalty on top of the 10% colony penalty. It's nearly impossible to add 10% of total research per new colony early on and with early tech, and while additional tech makes it easier (but not easy) to hit that, increased pop means you're aiming to hit 20-35% of total research per new colony to stay ahead of penalties. You can get ahead of that with enough tech and width, but it takes a lot of research and time to get to that point.