ifthen + [ngerman]babel + pgfplots + axis + text height = ☇

This post is related. As far as I can see, the answers there provide only workarounds. Here is another workaround.

\RequirePackage{ifthen}
\documentclass{article}
\newboolean{techrep}
\setboolean{techrep}{true}
\usepackage[ngerman]{babel}
\usepackage{pgfplots}
\pgfplotsset{compat=1.14}
\usetikzlibrary{babel}
\begin{document}
\section{Section name}
\begingroup\shorthandoff{"}
\ifthenelse{\boolean{techrep}}{%
  \begin{tikzpicture}
    \begin{axis}[
      xmax         = 5.5,
      xmin         = 0,
      ymax         = 5.5,
      ymin         = 0,
      extra x tick style = {text height=height("0")},
      extra x ticks = 3
      ]
    \end{axis}
  \end{tikzpicture}%
}{}\endgroup
\end{document}

I think that not using the ifthen package could be the best solution. If you load pgf, you can always introduce test integers and work with \ifnum or \ifcase, or a \newif.

\documentclass{article}
\newif\iftechrep
\techreptrue
\usepackage[ngerman]{babel}
\usepackage{pgfplots}
\pgfplotsset{compat=1.14}
\usetikzlibrary{babel}
\begin{document}
\section{Section name}
\iftechrep
  \begin{tikzpicture}
    \begin{axis}[
      xmax         = 5.5,
      xmin         = 0,
      ymax         = 5.5,
      ymin         = 0,
      extra x tick style = {text height=height("0")},
      extra x ticks = 3
      ]
    \end{axis}
  \end{tikzpicture}%
\else  
\fi
\end{document}