As I understand your question, you would like to automatically set the labelwidth of a certain list to the widest label of this list which is set via \item[<label>].
As it stands, this is not already implemented in the enumitem package. What you actually can do is to check the length of the last label in the list and set labelwidth to this width. Another way, as proposed by @Peter Grill, is that you use the widest option to set the length explicitly, which, however, is not as automatic as you would probably like it to be.
Possible ways to solve this, have been discussen in this question. I came up with the following alternative solution:
First of all, I used the description environment, because I think, this fits your needs better.
Then, I redefined the \item command, so that for each item in a list, the code now checks whether the the current label is wider than the previous label (or wider than 0pt for the first label) and, if yes, sets an internal length (\maxlabeltempwidth) to this value.
At the end of the list, this value is then stored (via \setwidestlabel) in the .aux file (credits go to @egreg for his great answer). In the end, for each list in the document, the .aux file stores a value with the width of the largest label.
In the list settings, this value is then finally used (via \getwidestlabel) to set the labelwidth.
\documentclass{article}
\usepackage{enumitem, calc}
\newlength{\maxlabeltempwidth}
\setlength{\maxlabeltempwidth}{0pt}
\let\descItem\item
\renewcommand\item[1][]{%
\descItem[#1]%
\setlength{\maxlabeltempwidth}{\maxof{\maxlabeltempwidth}{\widthof{\textbf{#1}}}}}
\makeatletter
\newcommand{\setwidestlabel}[2]{%
\immediate\write@auxout{%
\string\global\string@namedef{descwidestlabel\romannumeral#1}{\the#2}%
}
}
\makeatother
\newcommand{\getwidestlabel}[1]{%
\ifcsname descwidestlabel\romannumeral#1\endcsname
\csname descwidestlabel\romannumeral#1\endcsname
\else
0pt%
\fi
}
\newlist{foolist}{description}{1}
\setlist[foolist]{
after = \setwidestlabel{\EnumitemId}{\maxlabeltempwidth},
labelwidth = \getwidestlabel{\EnumitemId},
leftmargin = !
}
\begin{document}
\begin{foolist}
\item[Abc] Aute esse ut qui est id veniam qui consectetur aute sit quis reprehenderit.
\item[Def] Tempor qui ullamco anim nisi occaecat pariatur ullamco duis sit non occaecat exercitation qui.
\item[Ghi] Ullamco consequat velit fugiat quis.
\end{foolist}
\begin{foolist}
\item[Abcdefghi] Aute esse ut qui est id veniam qui consectetur aute sit quis reprehenderit.
\item[Def] Tempor qui ullamco anim nisi occaecat pariatur ullamco duis sit non occaecat exercitation qui.
\item[Ghi] Ullamco consequat velit fugiat quis.
\end{foolist}
\begin{foolist}
\item[Abc] Aute esse ut qui est id veniam qui consectetur aute sit quis reprehenderit.
\item[Def] Tempor qui ullamco anim nisi occaecat pariatur ullamco duis sit non occaecat exercitation qui.
\item[Ghi jkl] Ullamco consequat velit fugiat quis.
\end{foolist}
\end{document}
And this is the output:

leftmargin. In your example, the margin is narrower than the labels, and thus, the labels protrude into the text and push it to the right. – Jasper Habicht Dec 20 '21 at 00:10