Here is a script that will destroy all non-byzantine aor buildings in their settlements. If you copy it and change the faction you can use it for all factions, with a "not factionislocal' command it should make it only ai.
Also you can include a monitary reimbursement to the faction in the command aswell. I BELIEVE it goes after the building chain and before true and is just a number.