Yes, the difficulty and the time it takes to capture a location affect the loot, but initially, it is generated randomly. Also, at the beginning of the game, different numbers of creatures appear in identical treasure locations, and the reward also depends on this. When clearing Dragon Cities on the same day, in one case, I only found one Orb of Horror, and in the second, I found a Book of Order and two Wands. During the second clearing, it seems that what was found the first time is regenerated (if there was one minor artifact, one will be generated again) plus something else, and there seems to be a certain limit to the number of artifacts; otherwise, for example, in the same Dragon City, after the tenth clearing, you could get up to forty artifacts. In the Ivory Tower and the Temple, there are always 7 items, and it seems that in the Beholder Lair, there are always two (one treasure and one item/potion). But it is not worth drawing conclusions from all this; these are just tests in the game. To find out everything for sure, you need to analyze the source code, which is not so easy to do. The only thing that can be said for certain now is:
Great and minor artifacts can be found in the Dragon City, the Shipwreck, the Pyramid, and the Mausoleum,
Treasures can be found in the Shipwreck, the Abandoned Ship, the Labyrinth, the Pyramid, the Lair, and the Cemetery,
Items and potions can be found in the Tower, the Lair, and the Temple,
Scrolls and parchments can be found in the Ivory Tower and the Temple.