Yes, well, current TC system is acually facing very simillar problems. I personally, dont have anything against set TC hours (like in the old days).
Anyways, one way, to allow the defenders to strike back:
The Raiders enter city
Kill the NPC they want to rob
A reward is put into the Raiders base
The faction that was in control of the town, now sees the raider base for 16 hours.
They can attack the raider base and try to get back what was stolen from them.
If the 16 hours pass, and the Defending faction dont manage to get back the loot from raider base, the loot turns into caps for the raiders.
Well, i dont like it 100%, but its an alternative.
Either way, i think what is porpose of this Idea about Raider/Defenders, is that, to not to destroy the defenders vision to hold the town (like we have now in the game world).
Also, this could be altered, that to take control of town, it requires more then just 5 people. I would suggest some starting money too, like 10k. To discourage gangs from taking town, if they just take it for "lolz" or money.
The other thing is, that a Raid is not end of the world, if it shows too good for raiders and too bad for defenders, one could possible set a limit of lootable NPCs per hour/30 min or something.
And the thing about the attacks at night, Devs tried to get around this with setting this hours of when people can TC. Its very hard thing to deal with this in a reasonable way. But yeah, that is one idea. To have set hours for TC.
Maybe, also, there would be a multiplicator, which would deliver its multiplication number from amount of players online. For exemple, if you kill a NPC to raid loot defenders money at night, when 50 people are online, you will get a penalty. If there are 250 people online, you will get a bonus (both in amount of money, and in amount of time it takes for NPC to respawn as both should be connected).
With/Without the Raider/Defender system, it could be possible to discuarege town taking at night by making the amount of bribe (if it would cost to take the town) also depend on amount of players avalible on the server (or amount of players needed to take the town, would grow when low amount of players online). Ofcourse the amout of players calculation should by dynamic, an idea would be to make a check for amount of players online every day automaticly, and store it in a file, then let it automaticly count out the average - highest - lowest and go from that to decide what bonus / penalties should there be, possible counting out % of the highest.