I'd like to patch the section command to add at the end a simple \label in a way that is as generic as possible (I don't want to assume the number of arguments of the section command for instance, so I can't use \let and redefine \section directly).
However, the patched version moves the title outside of the section:
\documentclass{article}
\usepackage{etoolbox}
\ifdef{\section}{
\ifpatchable*{\section}{
\apptocmd{\section}{{\label{DEF}}}{}{}%
}{}
}
\usepackage{hyperref}
\usepackage{cleveref}
\begin{document}
\section{Name of my section}
Hello everybody. \cref{DEF}
\end{document}

