Something like this?

My proposition uses categories
(such as FX or EL), each time a new category is introduced, a counter is increased and the local element counter is reset. The \newcatelement
macro is responsible for stepping the element counter, an eventual label and the output of FX-XX
where XX
is a the number.
\documentclass{article}
\usepackage{xparse}
\newcounter{categorycounter}
\newcounter{elementcounter}[categorycounter]
\makeatletter
\renewcommand{\theelementcounter}{%
\@currentcategory-%
\ifnum\value{elementcounter} <9\relax%
0\number\value{elementcounter}%
\else
\arabic{elementcounter}%
\fi
}
\newcommand{\newcategory}[1]{%
\gdef\@currentcategory{#1}%
\refstepcounter{categorycounter}%
}
\NewDocumentCommand{\newcatelement}{+o}{%
\refstepcounter{elementcounter}%
\IfValueT{#1}{\label{#1}}%
\theelementcounter%
}
\makeatother
\usepackage{hyperref}
\begin{document}
\begin{table}[]
\begin{tabular}{|l|l|l|}
\newcategory{FX}\newcatelement[fire] & Fire & Call for help \\
\newcatelement[explo] & Explosion & Run away \\
\newcategory{EL}\newcatelement[elec] & Electrocution & Contact doctor \\
\end{tabular}
\end{table}
See \ref{fire} or \ref{explo}, but also \ref{elec}
\end{document}
Update with better setup
\documentclass{article}
\usepackage{xcolor}
\usepackage{xparse}
\newcounter{categorycounter}
\newcounter{elementcounter}[categorycounter]
\makeatletter
\newcommand{\@categoryseparator}{-}
\NewDocumentCommand{\setcategoryseparator}{+m}{%
\renewcommand{\categoryseparator}{#1}%
}
\renewcommand{\theelementcounter}{%
\@currentcategory\@categoryseparator%
\ifnum\value{elementcounter} <9\relax%
0%
\fi
\arabic{elementcounter}%
}
\def\@currentcategory{}
\NewDocumentCommand{\newcategory}{m}{%
\gdef\@currentcategory{#1}%
\refstepcounter{categorycounter}%
\ignorespaces
}
\NewExpandableDocumentCommand{\newcatelement}{s+o+m+m}{%
\refstepcounter{elementcounter}%
\edef\@currentlabelname{#4}%
\IfValueT{#2}{\label{#2}}%
\theelementcounter& #3 & #4 \IfBooleanF{#1}{\tabularnewline}%
}
\makeatother
\usepackage{hyperref}
\begin{document}
\begin{table}[]
\begin{tabular}{|*{3}{l|}}
\newcategory{FX}
\newcatelement[fire]{Fire}{Call for help}%
\newcatelement[explo]{Explosion}{Run away}%
\newcategory{EL}
\newcatelement[elec]{Electrocution}{Contact doctor}
\end{tabular}
\end{table}
In case of \ref{fire} just \colorbox{yellow}{\nameref*{fire}} or but in case of \ref{explo} \colorbox{red}{\color{white}\bfseries\nameref*{explo}}. Take care of \ref{elec}!
\end{document}

\label
needs a counter to be connected to, unless you know the magic behind it.\documentclass
and\begin{document} ...\end{document}
+ your table stuff would be the minimal version.