I know terrain improvements joining adjacent cities and eating precious city tile space has been discussed at length. But I just had it happen to me in a rather obnoxious way, so I thought I'd offer my thoughts.
Here's a shot of what happened:

My borders had included the two shards and gold mine there in the middle. They were wild, not in city limits. The refugee camp was in his zone, but not built. So after taking Iyuezeat (Kraxis's capital), I blithely built the refugee camp which immediately linked to the new city, and by proxy linked the other three existing wild improvement. Sure, losing 16 tiles is annoying, but even more annoying is this:
Suddenly my capital's existing tiles are within 5 tiles of Iyuezeat and I can't build any further.
You can see where this might be a problem. I've had similar proxy linking trouble with resources that show up after research. They get plopped next to a city but also next to existing improvements I snaked around. If I dare build on it, all those exiting resources it touches are linked.
So what to do? Perhaps simply offer a prompt when building. "Do you want this to be joined to <CityName>? Yes / No"
Perhaps offer as an unlimited use "upgrade" the ability to join it to a city or remove it from said city. Cost some nominal amount of materials and take a turn or two to prevent instant, free defense on it.
I tried to wrap my brain around a way to mod this in, but I'm not sure it's possible at this point.