Making only the most minor of changes to the 1st of my former approaches cited in the related question, perhaps this is what you are asking for.
The change amounts to placing the \scaleto inside a recursive stack. I used the \quietstack option of the stackengine package, to not print out intermediate results, saving it for the end with \usebox{\stackedbox}. I also set the stacking gap to -1pt (which can be altered to suit, possibly even a fraction of \curht if desired).
Changing the \stackunder to \stackon will reverse the vertical sense of the stack (3 on top, not bottom), as shown in the 2nd image.
\documentclass{article}
\usepackage{scalerel,stackengine}
\newlength\curht
\def\defaultdimfrac{.98}
\def\defaultstartht{\baselineskip}
\newcommand\diminish[2][\defaultdimfrac]{%
\def\quietstack{T}%
\setstackgap{S}{-1pt}
\curht=\defaultstartht\relax
\def\dimfrac{#1}%
\diminishhelpA{#2}%
}
\newcommand\diminishhelpA[1]{%
\expandafter\diminishhelpB#1\relax%
}
\def\diminishhelpB#1#2\relax{%
\stackunder{\scaleto{\strut#1}{\curht}}{\usebox{\stackedbox}}%
\curht=\dimfrac\curht\relax%
\ifx\relax#2\relax\usebox{\stackedbox}\else\diminishhelpA{#2}\fi%
}
\begin{document}
\def\pinum{3.14159265358979323846264338327950288419716939937510}
\def\defaultstartht{38pt}
\diminish[0.92]{\pinum}
\end{document}
or with \stackon
