making the engine know that some unit was hit by arrows from another specific unit
There lies the rub. It must be battle script and I don't know much about it. The M2TW Scripting workshop might be a better place to ask it.
Anyway, I had a quick look through the Docudemons. There is this event: BattleEnemyUnitAttacksPlayerUnit which has a couple of associated conditions that look promising.
For example...
Code:
declare_counter poison_used_this_battle
monitor_event BattleEnemyUnitAttacksPlayerUnit BattleEnemyUnitSpecialAbilitySupported = flaming_ammo
and BattleEnemyUnitSpecialAbilityActive
and not BattleIsMeleeAttack
set_counter poison_used_this_battle 1
end_monitor
...says: an enemy unit had his flaming_ammo special ability active when he missile-attacked a player unit. "Attacked" probably does not necessarily mean "hit".
There is an event and conditions for the reverse too: BattlePlayerUnitAttacksEnemyUnit, BattlePlayerUnitSpecialAbilityActive, BattlePlayerUnitSpecialAbilitySupported.
The question is whether Battle[Enemy|Player]UnitSpecialAbilitySupported supports custom special abilities, if they're even possible (or is your poison still flaming_ammo?).
If that does work then it's a matter of what to do with that counter. It should be set to 0 before any battle and then, after the battle, if it is 1 then test which settlement(/region?) it was fought in and have script create plague/whatever accordingly.
NOTE: it won't work in auto-resolve. Battle script never does (AFAIK).