That's sort of how I play. For military units, build almost nothing but spearmen. Build like 1 swordsman, 1 archer, 1 horseman, just so the AI knows you have them (the Romans fear our swordsman, etc). It's really how many units you have that influences the computer, not what they are, seems to me.
Then build as many libraries and universities as you can, to boost research. Try to build the Colossus and Great Library. As the game progresses, also try to make sure you get Leo's Workshop (to keep upgrading all those spearmen), Copernicus' Observatory, Newton's University (or whatever it's called), and SETI. Also try to make as many temples and coliseums as possible, to expand culture and keep your people happy.
By gearing for science and mostly building a defensive, upgradable military, you WILL get pushed around with demands for tribute from those civs with larger, more offensive armies. Pay them off to keep them off your back. If you freely trade most of your techs, you can often avoid this. Then once you've survived into about the industrial age, you should be able to pump out cavalry like there's no tomorrow, and with any luck, still be facing opponents with large standing armies of swordsmen, longbowmen, etc. Generally I can hold them from declaring war until they make a demand for something like Replaceable Parts. I refuse, and so they declare war. Big deal, you know that you have infantry and artillery, and they don't. You should easily be able to crush their military standing on the defensive, then begin to counterattack, because after all, you know they don't have this technology, since they demanded it from you, right?
Using this method, I can usually hold off aggressors enough not to lose any cities (altho at times they'll play hell with my terrain improvements) until such a time as I can crank out cavalry, or even tanks, and then proceed to obtain some serious payback from the lower tech bullies who pushed me around a bit in the older eras. And along the way, you'll quite likely culturally absorb several cities as well as be on your way to an eventual cultural victory.
Works for me, your mileage may vary.