Hooks to make it so a unit is destroyed and a feature is put in his place,
Be very, very careful with this. Most of the Lua events don't trigger like you'd think they would. For instance, take SerialEventImprovementCreated. It triggers when an improvement is created, which makes it the obvious choice for something like this, right? Just one catch: it only triggers when you SEE an improvement be created. If the AI is producing the improvement somewhere else in the world, it won't trigger until you move one of your units to where he can see that tile.
Or SerialEventUnitCreated. It triggers whenever a unit is created, and unlike the ImprovementCreated event, it triggers even if a unit is created off in the fog of war someplace. Sounds great, right? Well, unfortunately it also triggers whenever a unit embarks, or whenever a unit disembarks, or whenever a unit enters a "transport" unit like a Carrier or Missile Destroyer, or whenever an air unit rebases... you get the idea.
The common thread to both of these is that they're UI-based; something's only important when there's the potential of changing the display on the active player's computer screen. This sort of inconsistency is a major flaw. The only events that consistently trigger exactly when you'd expect them to are the start-of-turn and end-of-turn events, or the various GameEvents options (like the SetUnitXY event for movement).
then I can hook into the start of a turn and check to see how many buildings of such exist and update resources that way.
It's not quite that simple, but go over into the mod components forum (I think) and look for the "Building Resources" mod. That mod leveraged the save/load functionality to allow buildings to create strategic resources without huge amounts of overhead.
It looks like I can code in some AI routines in Lua, but these would be tricky (the AI has different goals than the Players) and take some research to get going.
The problem with doing this is you can't integrate it into the existing Flavor system, which is the primary driver behind AI behavior. And that means you can't easily make one civilization act differently than another. For some things, this isn't really a problem. But in this case, you're asking to add some complex behavior.
For instance, the example I gave before: what do you do to prevent the AI from putting this improvement on the wrong tile, one that you need for its more mundane yields? What do you do to prevent the AI from destroying one of these improvements because it thinks some other one is better? The problem is that the AI's behavior is probabilistic, not absolute; no matter how high or low you set Flavor values, it'll still have a chance of doing really stupid things, unless you create a mechanism that makes those stupid things completely impossible. And those sort of limits are much harder to implement.
I'm not averse to learning Lua (my previous attempt at this idea was C# but I realized I was in over my head) so I'll take a look deeper.
Lua is not difficult. It's just a question of learning how to use the existing functions we've been handed to do the things you want, OR altering your design to work with the functions we do have. And that's a problem, because I think there are several points in your design that just won't work without significant changes.