Again I agree what you say about musketeers (that doubling of hitpoints seems seriously OP, they seem to be quite a big jump compared to other upgrades, and this also basically forces you to go for them). This was a problem for me in default freeciv and my solution was to increase the cost of industrial units, and to reduce the costs of ancients units (so the attack/cost or defense/cost increases slowly with time). This way, gunpowder gives you a powerful unit, but there is no so much hurry because it is expensive and it obsoletes all other cheap units, as well as barracks.
I agree it is not good idea to try to conquer with ancient units, cities defended by fireguns, but I find it realistic, and I tried to make it possible to defend your cities with ancient units even against riflemen and cannons (as native indians of america against european).
If I understand, you agree about the problem, but you would have liked a different solution where musketers are cheaper and less powerful, but I think current values of those units are overall balanced. Doesn't it?
Well, as I said in some other posts realism argument is not persuasive to me. Second early firearms were kinda shit, I do not think that for city defense they provided much advantage over crossbows (some of crossbows are sickly powerful, while most likely muskets had quite limited accuracy [no bore simple balls, widening firing end]).
While I need more experience with how things are, but so fat it seems that musketeers are too powerful (similar for other units with increased hp). As for obsolescence of barracks, well I personally almost never build them and see them as highly marginal (if units were not supported "per city" then maybe it could make more sense, but even then. On the other hand I might be underestimating them) thing so I do not think that offsets anything.
As for cost, well I don't know how you figure that musketeers have higher cost. Musketeer A:3,D:3,M:1,HP:20,Shields:40, Swordsmen A:4,D:2,M:1,HP:10,Shields:40. Only two things change, point goes from attack to defense, and doubling of HP. So there is tremendous increase in power with no difference in cost. Similar with Catapult, though on flat land catapult attacking musketeers should be able to win fairly easily by my calculations, not so for cities or mountain fortresses (mountain fortress are insanely powerful), pop there a hardened musketeer and taking it will probably require sacrifice of at least 3 canons. Though dunno thats not necessarily bad. Anyways doubling of hit-points seems imbalanced, as I said maybe something like 15 HP would be better. I'm also against increasing costs further, 40 shields is sickly expensive anyways. Swordsmen come pretty damn early, and to have enough production to reasonably make them seems 'unreasonably difficult'.
And again obsolescence of old units seems very bad to me. Yeah now that musketeers are so OP there is little point in building anything older. But again as I said previously it makes game incredibly bland. There are no cheap units (warriors), no attack units (archers/swordsmen), no defense units (phlanx/pikemen), realistically there are no fast attack units ether (horsemen/elephants), as win chance agains musketeers is just so pitiful (personal experience: musketeer on plains [so no def bonuses], attack with two horsemen, one of them hardened, musketeer has half hit-points left after that [well it was somewhat lucky I guess but still], and thats on plains, if it were on rougher terrain one would probably need something like 5 horses for 1 musketeer, if not 6, basically 3x the cost [and in between attacks musketeers would probably level up]!).