Assume that we have the following DGP: $$ y=\beta_{1}+\beta_{2}X+\epsilon $$ where $X=\{0,1\}$ is an indicator variable. The OLS estimator in this case is easy to compute: $$ \hat{\beta}_{OLS}=E\left[y|X=1\right]-E\left[y|X=0\right] $$ Now assume that we have another continuous variable $Z.$ Write down the DGP as $$ y=\beta_{1}+\beta_{3}X+\beta_{4}Z+\epsilon $$
In this case, can we write down the OLS estimator as: $$ \hat{\beta}_{OLS}=E[E\left[y|X=1\right]-E\left[y|X=0\right]|Z] $$
where we take the difference in conditional means of $y$ for $X=1$ and $X=0$ for each value of $Z,$ and then average over it?