Your reasoning can have some hole.
Hole 1: what if we and/or Zara have not enough land to be the UN opponent to the owner (thanks to our gift) of the UN?
Well, if we go for a Diplo game, after Religions and key Wonders, our secondary goal was to REX.
Assuming that we find where the Barbs have hidden the Fur, we'll at least have that land in addition to other AIs. Even if an AI beats us to that land, we MUST capture it, as an AI will NOT trade a single Resource. So, even if an AI beats us to that land, we WILL OWN THAT LAND. So, we can count that land as helping us to be bigger.
If we ALSO STEAL some of Zara's land, then GIVE IT BACK TO HIM later, then we will have all of our original land plus Barbarian Land. That SHOULD be enough to be #1 in population, if AIs are spread out evenly.
If AIs are not spread out evenly, as you suggested they might not be, then we'll do what you suggested: steal land from the biggest or second biggest AI in the game. Then for sure we will be the biggest!
If we take the land that Zara should have (if he weren't messing around letting his Settlers die to Barbs), then give it back to him, we will not LOSE any land. But, if we don't take any of his land, we will have to give him some of OUR LAND. Then, we might be a bit smaller than the average AI.
Hole 2: if Zara (and i think it's correct) can be our best buddy, why the gift the UN city to him?
We simply leave the option open. Why grab any Holy Cities? Can't you send Missionaries around the world and pay all AIs to switch on the same turn? Yes, we can do exactly that, but owning the Holy Cities reduces the CHANCE that the AIs will switch out of the religion that we choose for them. So much for religious freedom--we will plan to force them to practice a certain religion!
The concept here is the same. There is a CHANCE that Zara might be the ideal AI to have as our opponent. We won't know until the Diplomatic situation reveals itself. By that time, it will be too late to build a city in his area to give back to him. We will instead have to use a different option:
1. Declare war on him and take one of his cities
2. Give him one of our existing cities
3. Declare war on someone else, take their city, build the UN there, and give their city back
4. Don't gift the UN and rely on our Diplo skills
Number 4 SOUNDS GOOD and it MIGHT WORK. But if we have the chance to avoid scenarios 1 and 2 just by settling a single city now, why not do it? That way, we will have more options, in case Number 4 isn't as easy a way to victory as we would like to hope.
It's not like we'll give him the city right away. We will use the city as any other city, building Cottages, infrastructure, using it to build Settlers or Workers or Missionaries or whatever, just like any other city. We just will plan for the POSSIBILITY of giving it to Zara.
Who knows, we might even culture flip one of his cities. I've culture-flipped an AI capitol a few times before, it IS possible, especially if we settle close to him, like on the Plains River square. But that is not our main goal with settling there, it would just be a nice bonus that we will not count on having.
There is still a chance that we will build The United Nations in a captured AI city. But, if we want our opponent to be Zara, we can remove the need to declare war, leaving us 2 war declarations for 5 AIs, instead of 2 war declarations for 6 AIs--improving our odds of declaring on the correct AIs.
I'm just trying to find a simple way of making our ending game easy, without much extra difficulty now. It's not like we're settling a Desert City just to have the possibility to gift it to Zara later. Instead, we're going to try and settle a nice Cottageable city.