[step:Transfer differentiability from $g_{k,j,m}$ to $\bar f$ at Lebesgue density points of $D_{k,j,m}$]
By the Lebesgue Density Theorem, $\mathcal{L}^n$-a.e. point of any $\mathcal{L}^n$-measurable set is a Lebesgue density-$1$ point of that set. Applied to the Borel set $D_{k,j,m}$, the exceptional set
\begin{align*}
M_{k,j,m} := \left\{ x_0 \in D_{k,j,m} : \limsup_{r \to 0^+} \frac{\mathcal{L}^n(B(x_0, r) \setminus D_{k,j,m})}{\mathcal{L}^n(B(x_0, r))} > 0 \right\}
\end{align*}
satisfies $\mathcal{L}^n(M_{k,j,m}) = 0$.
[claim:If $x_0 \in D_{k,j,m} \setminus (M_{k,j,m} \cup N_{k,j,m})$, then $\bar f$ is Fréchet differentiable at $x_0$ with derivative $\ell := \ell(x_0)$. Since $\bar f = f$ on $S_f$ and $x_0 \in D_{k,j,m} \subseteq S_f$, in particular $\bar f(x_0) = f(x_0)$, and the same conclusion holds for $f$ along $h$ with $x_0 + h \in S_f$.]
[proof]
Let $\alpha_n := \mathcal{L}^n(B(0, 1))$. We will show
\begin{align*}
\lim_{h \to 0} \frac{\bar f(x_0 + h) - \bar f(x_0) - \ell(h)}{|h|} = 0.
\end{align*}
Throughout, $|h|$ is restricted to be small enough that $x_0 + h \in \Omega$ (using openness of $\Omega$) and $|h| < 1/(16j)$.
*Step (a): Density gives a near-by point of $D_{k,j,m}$.* Define
\begin{align*}
\theta(r) := \frac{\mathcal{L}^n(B(x_0, r) \setminus D_{k,j,m})}{\mathcal{L}^n(B(x_0, r))}, \qquad r > 0.
\end{align*}
By the density-$1$ assumption at $x_0$, $\theta(r) \to 0$ as $r \to 0^+$. For $h \ne 0$, set
\begin{align*}
\rho(h) := 3 \cdot \theta(2|h|)^{1/n}.
\end{align*}
Then $\rho(h) \to 0$ as $|h| \to 0$.
For $|h|$ sufficiently small that $\rho(h) < 1$, we claim $B(x_0 + h, \rho(h)|h|) \cap D_{k,j,m} \ne \varnothing$. Indeed $|h| + \rho(h)|h| < 2|h|$, so $B(x_0 + h, \rho(h)|h|) \subseteq B(x_0, 2|h|)$. If the intersection were empty,
\begin{align*}
\alpha_n (\rho(h)|h|)^n \le \mathcal{L}^n(B(x_0, 2|h|) \setminus D_{k,j,m}) = \theta(2|h|) \cdot \alpha_n (2|h|)^n,
\end{align*}
forcing $\rho(h) \le 2 \theta(2|h|)^{1/n}$, contradicting $\rho(h) = 3 \theta(2|h|)^{1/n}$ when $\theta(2|h|) > 0$. (If $\theta(2|h|) = 0$, $D_{k,j,m}$ has full Lebesgue measure in $B(x_0, 2|h|)$, and the open ball $B(x_0+h, \rho(h)|h|) \subseteq B(x_0, 2|h|)$ has positive Lebesgue measure, forcing nonempty intersection.)
So choose
\begin{align*}
z = z(h) \in B(x_0 + h, \rho(h)|h|) \cap D_{k,j,m},
\end{align*}
satisfying $|z - (x_0 + h)| \le \rho(h)|h|$ and $|z - x_0| \le (1 + \rho(h))|h| \le 2|h|$ for $\rho(h) \le 1$.
*Step (b): The decomposition.* Since $x_0, z \in D_{k,j,m}$, $\bar f(x_0) = f(x_0) = g_{k,j,m}(x_0)$ and $\bar f(z) = f(z) = g_{k,j,m}(z)$. By linearity of $\ell$, decompose
\begin{align*}
\bar f(x_0 + h) - \bar f(x_0) - \ell(h) &= \big[\bar f(x_0 + h) - \bar f(z)\big] \tag{I} \\
&\quad + \big[g_{k,j,m}(z) - g_{k,j,m}(x_0) - \ell(z - x_0)\big] \tag{II} \\
&\quad + \big[\ell(z - x_0) - \ell(h)\big], \tag{III}
\end{align*}
using $\bar f(z) - \bar f(x_0) = f(z) - f(x_0) = g_{k,j,m}(z) - g_{k,j,m}(x_0)$ to rewrite (II).
*Step (c): Bound on (II) — Fréchet differentiability of $g_{k,j,m}$ at $x_0$.* Given $\varepsilon > 0$, by Fréchet differentiability of $g_{k,j,m}$ at $x_0$ with derivative $\ell$, there exists $\delta_1 > 0$ such that for $|w| < \delta_1$,
\begin{align*}
|g_{k,j,m}(x_0 + w) - g_{k,j,m}(x_0) - \ell(w)| \le \frac{\varepsilon}{6} |w|.
\end{align*}
For $|h| < \delta_1 / 2$, $|z - x_0| \le 2|h| < \delta_1$. Apply at $w = z - x_0$:
\begin{align*}
|\text{(II)}| \le \frac{\varepsilon}{6}|z - x_0| \le \frac{\varepsilon}{3}|h|.
\end{align*}
*Step (d): Bound on (III) — linearity of $\ell$.* By linearity,
\begin{align*}
|\text{(III)}| = |\ell((z - x_0) - h)| \le |\ell|_{\text{op}} \cdot |z - (x_0 + h)| \le L \rho(h) |h|.
\end{align*}
*Step (e): Bound on (I) — local Lipschitz bound on $\bar f$ at $z$.* Since $z \in D_{k,j,m} \subseteq S_k^j$ and $|x_0 + h - z| \le \rho(h)|h| < 1/(16j) < 1/j$ for $|h|$ small, $x_0 + h \in B(z, 1/j) \cap \Omega$. By the second claim of Step 4 applied at $z$:
\begin{align*}
|\text{(I)}| = |\bar f(x_0 + h) - \bar f(z)| = |\bar f(x_0 + h) - f(z)| \le L \rho(h) |h|.
\end{align*}
*Step (f): Closing.* Combining (I), (II), (III):
\begin{align*}
|\bar f(x_0 + h) - \bar f(x_0) - \ell(h)| &\le L \rho(h)|h| + \frac{\varepsilon}{3}|h| + L \rho(h)|h| = 2L \rho(h)|h| + \frac{\varepsilon}{3}|h|.
\end{align*}
Since $\rho(h) \to 0$ as $|h| \to 0$, choose $\delta_2 > 0$ with $\rho(h) < \varepsilon/(3L)$ for $0 < |h| < \delta_2$. For such $|h|$,
\begin{align*}
|\bar f(x_0 + h) - \bar f(x_0) - \ell(h)| \le \frac{2\varepsilon}{3}|h| + \frac{\varepsilon}{3}|h| = \varepsilon|h|.
\end{align*}
Since $\varepsilon > 0$ was arbitrary, $\bar f$ is Fréchet differentiable at $x_0$ with derivative $\ell$.
*Closing transfer from $\bar f$ to $f$.* Under the hypothesis that $f$ is Borel measurable, $\bar f$ is the canonical Borel **precise representative** of $f$ associated with the rational regularisation: it is Borel by construction (Step 1), and it agrees with $f$ on the Stepanov set, $\bar f = f$ on $S_f$. We have shown $\bar f$ is Fréchet differentiable at $\mathcal{L}^n$-a.e. $x_0 \in S_f$. Since $\bar f = f$ on $S_f$ and $x_0 \in S_f$, the value $\bar f(x_0) = f(x_0)$, and the linear functional $\ell$ is the differential of $\bar f$ (the precise representative of $f$) at $x_0$. This is the standard formulation of Stepanov's conclusion: the differential of the (precise representative of the) measurable function exists at $\mathcal{L}^n$-a.e. point of the Stepanov set.
Concretely: we have proved Fréchet differentiability of $\bar f$ at every $x_0 \in D_{k,j,m} \setminus (M_{k,j,m} \cup N_{k,j,m})$. Taking the countable union over $k, j, m$ and using $S_f = \bigcup_{k,j,m} D_{k,j,m}$ (where each $D_{k,j,m} \subseteq S_f$ and conversely, every $x \in S_f$ lies in some $D_{k,j,m}$ by the construction), we obtain Fréchet differentiability of $\bar f$ at $\mathcal{L}^n$-a.e. point of $S_f$, with $\bar f = f$ on $S_f$ — the conclusion of Stepanov's Theorem.
[/proof]
[/claim]
[/step]