That's exactly how I did my thesis ^^
\ifx\ispreambleloaded%
\relax%
\else%
\def\isstandalone{}%
\input{preamble}%
\fi
% ... content ...
\ifx\isstandalone\end{document}\fi%
and the preamble.tex would look like: \documentclass{scrbook}
% ... all the other stuff that goes in the preamble ...
\begin{document}
\def\ispreambleloaded{}%
(Note: Recounting this all from memory, so I may have gotten some stuff wrong.)