I actually could see something similar like a "local government plaza" where buildings like a courthouse or police station could go and can be built in multiple cities.
The loyalty bonuses for the district could be implemented for those that own the expansions.
The keyword here is security. The type of security which I mentioned simply wasn't the type of security which regular cops and judiciary enforce, moreover I doubt those establishments would be of much help when it comes to securing loyalty. What I envisioned was a type of national security agency which was established to deal with bigger threats.
I imagine the security district would have these traits:
_ Limited to 1 per civilization.
_ Enhancing your civ's espionage performances, such as boosting success chance of espionage activities in foreign cities, increasing the maximum number of spies your civ can have by 1 etc.
_ Generating loyalty, which can be distributed by you manually, or automatically distributed to cities which needed them the most (on the verge of flipping for example) - similar to how amenities are distributed. The equivalent of that feature in real life would be security agents being sent to territories which are attempting to secede and cracking down on those perpetrators, capturing foreign spies who incited, helped organizing and funded those movements, maintaining security, broadcasting patriotic propaganda etc, everything governments around the world do to prevent secessions.
_ Enemy spies operate at 1 levels below normal when targeting districts in this city.
_ Inflicting a penalty of reduced Science and/or Culture - that's the cost of national security and territorial integrity.
_ Building 1 would benefit domestic security.
_ Building 2 would benefit espionage.
...and more. I will think more about it when I have time.