Understanding trap and dead state in automata
The concepts you mention are not formal concepts. You can define several notions of a dead state, for example (focusing on DFAs):


A dead state is a non-accepting state with self-loops for all symbols.
As in definition 1, but we also require the state to be reachable.
A dead state is a state from which no accepting state is reachable.
As in definition 3, but we also require the state to be reachable.


If we allow some transitions to be "missing" (i.e., our definition of DFA defines the transitions function as a partial function rather than as a function) then we have more possibilities, for example:


A dead state is a non-accepting state in which all outgoing transitions are self-loops.
As in definition 1, but we also require the state to be reachable.
A dead state is a non-accepting state without outgoing transitions.
As in definition 3, but we also require the state to be reachable.


If the exact definition used matters, the concept should be explicitly defined. It is usually used in a somewhat informal way, in which the intended meaning is usually obvious from context.