You can use the extended optional argument of the sectioning commands. KOMA-Script will automatically omit empty ToC entries. To switch on the parsing for the extended optional argument, you have to use one of the following options:
headings=optiontotocandhead: Use the not extended optional argument for both the ToC and the running head
headings=optiontotoc: Use the not extended optional argument for the ToC only but the mandatory argument for the running head
headings=optiontohead: Use the not extended optional argument for the running head, but the mandatory argument for the ToC
So you can either use:
\documentclass[
headings=optiontotocandhead% switch on extended optional argument parsing
% for sectioning commands
]{scrbook}
\setcounter{tocdepth}{\subsectiontocdepth}% generally show part, chapter,
% section and subsection in the ToC
\usepackage{lipsum}
\begin{document}
\tableofcontents
\chapter{Chapter 1}
\lipsum[1]
\section{Section 1.1}
\lipsum[2]
\subsection[tocentry={}]{Subsection 1.1.1}% no ToC entry
\lipsum[3]
\subsection[tocentry={}]{Subsection 1.1.2}% no ToC entry
\lipsum[4]
\section{Section 1.2}
\lipsum[5]
\section[tocentry={}]{Section 1.3}% no ToC entry
\lipsum[6]
\section{Section 1.4}
\lipsum[7]
\subsection{Subsection 1.5}
\lipsum[8]
\end{document}
or
\documentclass[
headings=optiontotoc% switch on extended optional argument parsing
% for sectioning commands and restrict it to the ToC
]{scrbook}
\setcounter{tocdepth}{\subsectiontocdepth}% generally show part, chapter,
% section and subsection in the ToC
\usepackage{lipsum}
\begin{document}
\tableofcontents
\chapter{Chapter 1}
\lipsum[1]
\section{Section 1.1}
\lipsum[2]
\subsection[]{Subsection 1.1.1}% no ToC entry
\lipsum[3]
\subsection[]{Subsection 1.1.2}% no ToC entry
\lipsum[4]
\section{Section 1.2}
\lipsum[5]
\section[]{Section 1.3}% no ToC entry
\lipsum[6]
\section{Section 1.4}
\lipsum[7]
\subsection{Subsection 1.5}
\lipsum[8]
\end{document}
to get

tocvsec2: https://ctan.org/pkg/tocvsec2 – Ulrike Fischer Oct 16 '17 at 16:40