I am trying to create a page length box around a centrally placed text with a caption beneath it. The central text is one line formula. The box should fill all available space except for at the bottom, where a bottom-aligned caption restricts it. I have scoured answers like those mentioned here and here, but being a beginner, failed to assimilate those into a solution (the problem being the cited answers don't deal with center alignment and captioning). 
%Some code that generates a malformed output
\documentclass{scrartcl}
\usepackage{capt-of}
\usepackage{tikz}
\usetikzlibrary{calc}
\usepackage{lipsum}
\begin{document}
% dummy text
\par\noindent
\tikz[overlay,remember picture]\coordinate (image-start);
\par
\hfill
\vfill
$1+2=3$
\vfill
\null\hfill
\tikz [overlay,remember picture] \draw (0,0) rectangle ([yshift=\ht\strutbox-\fboxsep]image-start);
\hfill Caption\hfill \null
\newpage
\end{document}

%dummy text, 2. remove the\parbefore\noindent, 3. change the line with the caption to\par\centering Caption, and optionally 4. add\centeringbefore the equation. – Marijn Mar 22 '21 at 11:22\begin{document} \begin{stretchbox} \centering$1+2=3$ \end{stretchbox} \centering Caption \end{document}
– Marijn Mar 22 '21 at 11:30also works but there you need to manually set the height (here:0.97\textheight`).