Modding-related questions are more likely answered in the modding section. Next time this would be the best place to post.
1) You don't have to replace the FearImmunity-flag, you can just delete the
data "Flags" "FearImmunity" line.
2) Traits are completely hardcoded (except for Obedient in Potion.txt). We don't have access to their effects. A possible workaround would have been forcing the status via script but this doesn't seem to bypass immunities despite of what the description for the CharacterApplyStatus-call claims. You could apply another status though, if you're willing to get into story and character scripting (story scripting would be necessary to catch the traits of a character).
3) You can look immunity names up in
Public\Shared\Stats\Generated\Structure\Base\ValueLists.txt after extracting the right pak file or downloading it from the link that Cadmus88 provided in this thread:
Guide: Editing companion starting properties. This is the list for status immunities:
value "FreezeImmunity"
value "BurnImmunity"
value "StunImmunity"
value "PoisonImmunity"
value "CharmImmunity"
value "FearImmunity"
value "KnockdownImmunity"
value "MuteImmunity"
value "ChilledImmunity"
value "WarmImmunity"
value "WetImmunity"
value "BleedingImmunity"
value "CrippledImmunity"
value "BlindImmunity"
value "CursedImmunity"
value "WeakImmunity"
value "SlowedImmunity"
value "DiseasedImmunity"
value "InfectiousDiseasedImmunity"
value "PetrifiedImmunity"
value "DrunkImmunity"
value "SlippingImmunity"