It may also be a prioritization of target issue, as the problem seems to be mostly with City States and Capitals (assuming that's a true observation and not a biased perception on my part). In other words, the AI may be coded to consider City States (vulnerable on a military vs military assessment) and Capitals (presumably hard coded for Domination victory reasons) as sufficiently attractive targets that this outweighs any assessment (assuming there is one) of the possible Loyalty issues that may arise on conquest.
It's potentially a tricky thing to fix, as if you move a post-conquest Loyalty assessment too high up the decision tree, the AI may not pick any targets. Coding the AI to aim to capture enemy cities in clusters, the way a human would, may not be feasible considering how exponentially more complicated such an assessment would be compared to choosing a single city target. Razing cities would up the stakes in warfare, but could also prevent the AI from ever getting a foothold on another continent (sometimes the first city looks unholdable until you take the next city).
Perhaps the biggest issue lies with the AI's willingness to make peace after capturing a single city. In my test games, it seems to be universal that if a city falls, the AI wants to make peace shortly thereafter, often offering gold in order to get a peace treaty that lets them keep the city. Possibly that's a coincidence related to the AI's level of war weariness, possibly that's intended AI behaviour to limit the impact on a human player of a military dominant neighbour. However, when the AI chooses as it's single city to capture a capital that's surrounded by other cities, it results in the whole war being for naught.