Align numbered and unnumbered entries in ToC (Koma-Script)

Add the tocstyle package option toctextentriesindented.

\documentclass{scrartcl}
\usepackage[toctextentriesindented]{tocstyle}
\usetocstyle{nopagecolumn}
\selecttocstyleoption{tocflat}

\begin{document}

\tableofcontents{}
\hrulefill
\section{First section}

\section{Second section}

\subsection{A subsection}

\addsec{A section which should not have a number}
\end{document}

enter image description here


Here is a suggestion that needs at least KOMA-Script Version 3.20 (current on CTAN) but does not use any additional package.

\documentclass[toc=indenttextentries,toc=flat]{scrartcl}[2016/05/10]

\RedeclareSectionCommands[
  tocraggedpagenumber,
  toclinefill=\quad
]{part,section,subsection,subsubsection}

\begin{document}
\tableofcontents

\noindent\hrulefill
\section{First section}
\section{Second section}
\subsection{A subsection}
\addsec{A section which should not have a number}
\end{document}

enter image description here