tldr: The AI isn't good, but the simplicity of the game, allowing the player to optimize their play, is a bigger problem.
The AI isn't so much a problem as is the simplicity of the game. Civ6 made the path through the game trivial. Keeping above the threshold of a city becoming unproductive is really very easy. As long as a city has production, it is fine, and you can easily make more production, and all the required currencies from there with appropriate tile improvements and districts. It isn't a very complex mental process to make decisions on what to build next, and it doesn't change from game to game.
In Civ7 they have to make city building far more complex. They have to reintroduce public health and overcrowding, happiness and loyalty needs to be far more punishing. The calculation to work out what to build next has to be far more difficult or include some RNG so that the computer has a chance on an equal footing. What really upsets people is the AI getting advantages in combat and loyalty to create competition. It isn't that the AI is bad, it is that players can too easily play the game in an optimal fashion. Any game that can be won by a player will be won, and there is little that a different map or Civ provides in complexity.
When I lose a game these days, I pretty much figure I lost because the game was unwinnable, not because I made any particular mistake. I just got a bad start on the map and got overwhelmed by the surrounding Civs with their start advantage. The Civs around you sacrifice themselves, so that an unmolested Civ on the other side of the map can win. That is just no fun.
The game has to be complex enough, so that the player can be lured into mistakes the AI wont make, because it can work out the correct next building to build. There has to be more choice. So for example, the bonus hex should be a pasture, allowing a player to improve it to horses for military, oxen for more production, or cows for more food. Buildings in districts should be useless if you don't have the population to work them and so on.