I need to look into the code, but I have high hopes for implementing this without too much difficulty.
terror should be the fear of the few really terrifying units, while fear can be from many more units that are legendary, huge, decaying, etc.
fear will be infinitely less effective than terror (a small combat penalty and maybe a small chance of refusing to attack a stack with the unit in it.)
I think the current method is to have the fear-causing unit 'cast' a fear spell on all nearby units at the start of a turn.
I'd keep this part (for terror), but maybe expand the function to include attacking:
If the target plot contains a fear-causing unit, the attacking unit may refuse to attack and get the immobilized by fear promotion... which lasts a single turn.
(or just end unit-turn if that is possible)
terror affects units from a distance by sheer presence.
refusal to attack should use the same method, but have a higher chance than fear. The same method needs to be used, because fear and terror are linked: a unti with fear suffers only fear effects from terror and terror is not affected by anything. These conditions can be checked via promotions.
The method also needs to check for immunity from fear/terror. (I gather this functionality is already in)
Let's start a dedicated thread on fear/terror.
(edit: I did not mention combat effects, because these need not be considdered)