Once you factor in the Swordsman's +10 against anti-cavalry units, even that matchup (36+10 vs 41) fails. And Pikemen are much more expensive than Swordsmen. It's just that you're stuck with them if you don't have Iron. In that case you need to beeline straight for Gunpowder and try your luck in the Nitre race to have anything approaching a competent army.
This is why I think Civ VI's combat system is in need of substantial changes, at least balance-wise. Corps come way too late for you to realistically combine resourceless spears and pikes to stand a chance against an army with Iron. You're best off just building a load of Crossbowmen.
I also think Rock Paper Scissors is an improvement on what we have now, which is pretty much Rock Paper Scissors, but where your scissors are completely blunt, and you have to keep swapping your rock out every other era for a different one

.