What you would probably have to do would be to detect when a hut is 'popped' and replace it with another graphic, identical to the goody hut one. Though what would happen when an improvement was built?
This entire concept has a problem: having goody huts showing on the map that do not act as goody huts could become a bit irritating.
Goody Huts are improvements with the bGoody flag set.
So make a duplicate entry that doesn't have the flag set, has a different Type, and has iTilesPerGoody set to 0. If you don't set iTilesPerGoody it might place them on the map when it is generated. Since you can't tell a popped goody hut from an unpopped goody hut visually, you might want to give it a different Description tag too so that at least the mouse-over data won't show it as the same thing.
After that comes the slightly more difficult part. There are two possibilities:
1) When they disappear, if it counts as being pillaged then just setting the goody hut's ImprovementPillage tag to be the alternate version should work. So if this is the case, then it is purely XML.
2) If it doesn't trigger that, then you'd have to do a little Python mod to add the new improvement to the plot in the onGoodyReceived event handler.
Since it is an improvement, the new one can be pillaged and any other improvement will remove it. Well, if flagged via bPermanant then it is not removable (although I expect you could via Python just fine) and the plot can never be improved. You'd then be stuck with a little native village next to your city on into the future era, which seems silly. I don't know if an improvement flagged as permanent can upgrade at all, or to a non-permanent improvement, but if it can perhaps it could upgrade to a cottage if worked by a city for a few turns (and you could have it do this if it isn't marked as permanent, of course).
As in the White Lies Black Ops v. 2 (3.19) mod. The goody huts are replaced by a native village when explored and then you need to figure out what to do about those natives. I think it is done in Python and XML
I actually think that it would be better if good huts should stay on the map unless pillaged. (That would yield some gold.) The reward would however be "reloaded" at some intervals - unless inside a city's BFC - then it matures into a cottage if worked.