Section should automatically start new page if the whole section does not fit on current page
There is a simple solution that does require only a single pass ...
\documentclass{article}
\newcommand\mysection{\vfil\penalty-9999\vfilneg\section}
\usepackage{lipsum}
\begin{document}
\mysection{A} \lipsum[3]
\mysection{B} \lipsum[1-2]
\mysection{C} \lipsum[5]
\end{document}