Not true, units are cheap, especially early ones. In fact one of the drawbacks when I was considering Samurai strategies is it's cost. Unit's ramp up depending on era:
Warrior is dirt cheap: 30
Swordsman is expensive: 90
Samurai is very expensive: 180
Also:
Slinger: 25
Archers: 50
Considering a legion is 40str, even if it's a little more expensive than a normal swordsman, it's still much better than 180p for samurai for 45str. Also remember higher units costs more upkeep.
Actually, upgrades are always cheaper than building the units. Let me give you real world example:
Slinger is 25p but costs 90gold to buy
Archer is 50p but costs 30gold to upgrade.
You're paying 30gold for 25production. That is far below price. A gold is typically 2:1 for production/food though it's actual value is even below that (example trade city states give a flat 4gold, whereas military or industrial city states give +2production only to
either units or buildings (conditional))
Another example: Warrior -> Swordsman is 60production, you're paying 80gold. Again you're getting a MASSIVE discount. And on top of that, it's impossible to exchange gold

roduction at a 2:1 ratio, so most people jump at the chance to exchange their pgold into production even at 2:1. There's also policies that reduce upgrade cost by half etc...
Summary: The point stands, upgrading units is already very good, upgrades should
not be allowed unless you can build the unit in at least 1 city in your empire (that is already very generous), if you don't have an encampment you should not be able to upgrade to swordsmen with just 1 iron and you shouldn't be able to upgrade to knights from chariots with just 1 horse.