There are two kinds of problem here, actually three. Consider the following document echtler.tex.
\documentclass{article}
\usepackage{ifthen}
\begin{document}
\textbf{jobname}
\ifthenelse{\equal{\string\jobname}{echtler}} {TRUE} {FALSE}
\ifthenelse{\equal{\jobname}{echtler}} {TRUE} {FALSE}
\ifthenelse{\equal{\jobname}{\detokenize{echtler}}} {TRUE} {FALSE}
\ifthenelse{\equal{echtler}{echtler}} {TRUE} {FALSE}
\bigskip
\textbf{macro}
\newcommand{\echtler}{echtler}
\ifthenelse{\equal{\string\echtler}{echtler}} {TRUE} {FALSE}
\ifthenelse{\equal{\echtler}{echtler}} {TRUE} {FALSE}
\ifthenelse{\equal{\echtler}{\detokenize{echtler}}} {TRUE} {FALSE}
\ifthenelse{\equal{echtler}{echtler}} {TRUE} {FALSE}
\end{document}

As you see, the first attempt, with \string, returns false in every case. Indeed, it compares the characters (not the commands) \jobname or \echtler with echtler and the two are obviously different.
The second attempt returns false in the jobname case and true in the macro case. This is because the expansion of \jobname is indeed echtler, but with “stringified characters” (TeXnically, with category code 12 instead of the standard 11).
In the third attempt, the comparison string is “detokenized”, operation that converts character in “stringified form”, so the jobname case succeeds and the macro case doesn't.
How to get a comparison test that works independently?
\documentclass{article}
\usepackage{xparse}
\ExplSyntaxOn
\NewDocumentCommand{\stringsequalTF}{mmmm}
{
\str_if_eq:eeTF { #1 } { #2 } { #3 } { #4 }
}
\ExplSyntaxOff
\begin{document}
\newcommand{\echtler}{echtler}
\stringsequalTF{\jobname}{echtler} {TRUE} {FALSE}
\stringsequalTF{\echtler}{echtler} {TRUE} {FALSE}
\stringsequalTF{echtler}{echtler} {TRUE} {FALSE}
\end{document}

\str_if_eq_x:nnTFis deprecated and should be replaced by\str_if_eq:eeTF, don't ask me why… I did it and it works, maybe the author of this very useful solution should update the code… – yannis Aug 26 '21 at 17:28