My first game, I tried a traditional approach (mixed production and research), and I got my rear end handed to me in thin slices. The scope of my failure was awesome.
Second game, I went all-factories and found it to be easier to manage. However, you have to rethink your planets and raw materials. It's less about military / social / research, and much more about production / economy.
Economy Planet = money comes in. Production Planet = money goes out. That's pretty much it.
In order to keep your research up-to-par, you basically have to:
A- come up with HUGE amounts of production, and
B- amass bonuses anywhere you can
To tackle A, you have to have a ton of factories. To pay for a ton of factories, you have to have an incredible economy. So this is where it all starts.
When making planets, remember that every planet you own will have, at minimum, four squares claimed: Initial Colony, Starport, and two Factories. No matter what your planet ends up doing, it has to have at least this much.
So, your planet types will be essentially split between Production planets and Economy planets. Choosing which is which is easy, then. Of the four mandatory squares, two are factories. For a production planet, these two squares serve the planet's main purpose. For an economy planet, the factories are taking up space but not serving the essential purpose. In other words, the economy planets need more total squares to fully develop. Hence, your general rule of thumb: assuming a bare planet (no bonus tiles to complicate things), larger planets -> Economy planets. Smaller planets -> Production planets.
Note also that the money sucked in by a medium-sized Production planet can easily eat up the surplus of two large-sized Economy planets when Production is at full-tilt. So pick the planets you colonize and develop appropriately. Don't be afraid to pick up a small planet and then just leave it undeveloped if you don't have the Economy to support its development. If left alone, a planet with nothing more than an Initial Colony will be profitable. Not by a huge amount, but it's money in your pocket AND it keeps the AI out of that planet.
To tackle B, you need spaceship range. Go surveying - anomalies can give you a racial research bonus (or just put cash in your pocket, which helps with A above). Grab those Research resources first, develop them early. Start wars over them if you must. Blow up someone's Research starbase, take the resource, flee home and cower in anxious silence until such time as Diplomacy allows you to sue for peace. Build Economy starbases. First, look for clusters of planets that will let your starbase cover 3 or more planets and build those early. As your economy progresses and you have the leeway to build more disposable constructors, start building starbases that can cover 2 planets.
In terms of how you used the planets, you did it right. All of your planets are essentially available for Research; there's no real difference between one Production Planet and another Production Planet. Early on, when I had to get planets up and running with a quickness, I would wait until the planet was "established" (i.e. five/six tiles developed) before turning Research Focus on, but once it was on, it was pretty much on for good.
Later in the game, when I had more time to wait out colony development, I would turn on Research Focus before the second person got off the colony ship (the first person is the one who flips the Research Focus on, right?). After that, the only time I ever turned off Research Focus on any planet was when that planet was building a Galactic Achievement, it was near the end (5 or 6 turns away), turning off Research Focus would speed it up by a couple of turns, AND I was in a rush. I think it happened like twice (Galactic Bazaar and uhhhhh something else that seemed important at the time).
Keep in mind: even with this, my production far out-stripped my research abilities. I spent a lot of time waiting for a bunch of research projects to complete before I had anything to point my Military-Industrial Complex towards. But I was also far ahead of the AI, so I could afford to wait.