The code of memoir contains
\renewcommand*{\thechapter}{\@arabic\c@chapter}
\renewcommand*{\thesection}{\thechapter.\@arabic\c@section}
\renewcommand*{\thesubsection}{%
\thesection.\@arabic\c@subsection}
\renewcommand*{\thesubsubsection}{%
\thesubsection.\@arabic\c@subsubsection}
so you have to replace every \@arabic... by \two@digits...
\documentclass{memoir}
\setcounter{secnumdepth}{3}
\makeatletter
\renewcommand{\thechapter}{\two@digits\c@chapter}
\renewcommand{\thesection}{\thechapter.\two@digits\c@section}
\renewcommand{\thesubsection}{%
\thesection.\two@digits\c@subsection}
\renewcommand{\thesubsubsection}{%
\thesubsection.\two@digits\c@subsubsection}
\makeatother
\begin{document}
\chapter{Foo}
\section{Bar}
\subsection{Baz}
\subsubsection{Bla}
\end{document}

memoirrelated, here is a general solution: https://tex.stackexchange.com/a/30932/3929, you'll need to use it in a redefinition of\thechapter,\thesectionetc. – daleif May 14 '21 at 07:50