The problem here is that the section title is included inside a TikZ \node with no provisions for text spanning several lines. The problem can be easily solved in a number of ways, perhaps the simpler one is adding a text width=<length> option to the node, as the following simple example demonstrates:
\documentclass[10pt, compress]{beamer}
\usetheme{m}
\makeatletter
\def\progressbar@sectionprogressbar{%
{\usebeamercolor{palette primary}%
\progressbar@tmpcounta=\insertframenumber
\progressbar@tmpcountb=\inserttotalframenumber
\progressbar@tmpdim=\progressbar@pbwd
\divide\progressbar@tmpdim by 100
\multiply\progressbar@tmpdim by \progressbar@tmpcounta
\divide\progressbar@tmpdim by \progressbar@tmpcountb
\multiply\progressbar@tmpdim by 100
\makebox[\textwidth][c]{
\begin{tikzpicture}[tight background]
\node[anchor=west, fg, inner sep=0pt,text width=\linewidth] at (0pt, 0pt) {\insertsectionHEAD};
\draw[anchor=west, fg!20, fill=fg!20, inner sep=0pt]
(2pt, -16pt) rectangle ++ (\progressbar@pbwd, \progressbar@pbht);
\draw[anchor=west, fg, fill=fg, inner sep=0pt]
(2pt, -16pt) rectangle ++ (\progressbar@tmpdim, \progressbar@pbht);
\end{tikzpicture}%
}
} % end usebeamercolor{palette primary}
}
\makeatother
\begin{document}
\section{Elements and some other longer text so the title spans several lines}
\begin{frame}
test
\end{frame}
\end{document}
The original definition for \progressbar@sectionprogressbar has
\node[anchor=west, fg, inner sep=0pt] at (0pt, 0pt) {\insertsectionHEAD};
The modified version in my example is
\node[anchor=west, fg, inner sep=0pt,text width=\linewidth] at (0pt, 0pt) {\insertsectionHEAD};
The result frame with the section title (notice that line breaking is now allowed and automatic):

\\? – karlkoeller Jan 03 '15 at 20:47