The Factorio developer spent the last seven or eight years optimizing their game. The Civilization VI developers did not.
They have poured a lot of work into making their game run efficiently. No matter how much they do that, players will always expand their factory until the CPU cannot keep up.
And multiple of those devs have posted blog updates about various optimizations they've done. So performance isn't one person either.
They even have a chart of lines of code in Factorio over the years.