The graph of a continuous function defined on a general open/closed set has measure zero (without Fubini) I was trying to prove the truth (avoiding Fubini) or falsehood of

Q: Let $f:A\to\mathbb{R}^m$ be a continuous function where the domain $A\subseteq\mathbb{R}^k$ is open or closed. Then, is it necessarily the case that the graph $\Gamma(f,A)=\{(x,f(x)):x\in A\}$  has Lebesgue measure $0$ (and, thus, is Lebesgue measurable)?

But I failed. The thing is: I know that, on this site, the case where $A$ is a rectangle has been asked many times. But what about this more general case? I know how to prove it when $A$ is a rectangle (i.e. of the form $A=\prod_{j=1}^k [a_j,b_j]$) but I am unable to generalize this particular case to the more general case (if it is true). I know that every open/closed set in $\mathbb{R}^n$ is the countable union of compact spaces so it would suffice to prove it on compact spaces which seem helpful since continuity on compact sets implies uniform continuity. However, the rectangle case can't be extended to the compact case since there exist compact sets that aren't the union of countably many rectangles such as the Cantor set. Is there a possible counterexample? I don't think so, but there might be one (?). Also: sorry if this question has already been asked here. I've searched as best as I could and, sadly, found nothing...
Note: I don’t think that it’s valid to prove the case where $A=\mathbb{R}^k$ and $f$ is a continuous function (which is pretty trivial) and consider every other case of this problem as a simple restriction that follows directly. That is because not every continuous function $f\in C(A,\mathbb{R}^m)$ is the restriction of a continuous function with $\mathbb{R}^k$ as a domain. For example, $f:\mathbb{R}\setminus\{0\}\to\mathbb{R}$ defined $f(x)=\frac{1}{x}$ is continuous but its domain can’t be extended so that it’s still continuous. Or, even worse, $f:\mathbb{R}\setminus\left(\frac{\pi}{2}+\pi\mathbb{Z}\right)\to\mathbb{R}$ defined as $f(x)=\tan(x)$ can’t be continuously extended either.
Any help would be highly appreciated! :)
 A: Ok, let's do this. Let $A\subseteq \mathbb{R}^k$ be Lebesgue measurable and $f: A \rightarrow \mathbb{R}^m$ continuous. Then the graph $\Gamma(f,A)$ of $f$ is a Lebesgue null set. There are a bunch of steps involved, let me break it down:
$A$ compact:
If $A$ is compact, then $f$ is uniformly continuous. Let $A\subseteq [-L,L]^k$. For every $\varepsilon>0$ there exists $N=N_\varepsilon$ such that
\begin{align*}
\Gamma(f,A) &= \bigcup_{0\leq \ell_1, \dots, \ell_k \leq 2N-1} \Gamma(f, A \cap \prod_{j=1}^k [-L+\ell_j L/N, -L+(\ell_j+1)L/N]) \\
&\subseteq  \bigcup_{0\leq \ell_1, \dots, \ell_k \leq 2N-1} \left(\prod_{j=1}^k [-L+\ell_j L/N, -L+(\ell_j+1)L/N] \right) \times Q(f(-L+\ell_j L/N),\varepsilon).
\end{align*}
Here I used $Q(y,r)$ to denote a cube centered at $y$ with sidelength $2\varepsilon$.
Thus, we get
$$ 0\leq \lambda(\Gamma(f,A)) \leq (2L)^k (2\varepsilon)^m. $$
Taking $\varepsilon \rightarrow 0^+$ yields
$$ \lambda(\Gamma(f,A))=0. $$
$A$ is bounded:
By the inner regularity of the Lebesgue measure, there exists a sequence of compact sets $(K_n)_{n\in \mathbb{N}}$ such that $K_n \subseteq A$ and such that $\lim_{n\rightarrow \infty} \lambda(A\setminus K_n) =0$ (here I am using that $A$ has finite measure). If $A$ is open or closed, you can construct such compact sets by hand (well, if $A$ is closed and bounded, it is already compact, no need for a sequence. For open sets, you can consider sets that have smaller and smaller distance to the boundary of the set, i.e. $K_n = \{ x\in A \ : \ \text{dist}(x,\partial A) \geq 1/(n+1) \}$).
Now, we define $N= A \setminus \bigcup_{n\in \mathbb{N}} K_n$. Then we have
$$ \lambda(\Gamma(f,A)) \leq \lambda(\Gamma(f,N)) + \sum_{n\in \mathbb{N}} \lambda(\Gamma(f,K_n)) = \lambda(\Gamma(f,N)), $$
because $\lambda(\Gamma(f,K_n))=0$ by the previous case (as $K_n$ is compact). Hence, we need to show that $\lambda(\Gamma(f,N))=0$. For this we define $F_n = \{ x\in A \ : \ \vert f(x) \vert \in [n,n+1) \}$ and compute
\begin{align*}
\lambda(\Gamma(f,N)) \leq \sum_{n\in \mathbb{N}} \lambda(\Gamma(f,N\cap F_n))
\leq \sum_{n\in \mathbb{N}} \lambda(N\times [-n-1, n+1]^m) =0.
\end{align*}
Here we used that $\lambda(N)=0$ and hence
$$\lambda(N \times [-n-1, n+1]^m) = \lambda(N) \lambda([-n-1, n+1]^m)=(2n+2)^m \lambda(N) =0.$$
General $A$:
We have
$$ \lambda(\Gamma(f,A)) \leq \sum_{(\ell_1, \dots, \ell_k)\in \mathbb{Z}^k} \lambda\left(\Gamma\left(f,A\cap \prod_{j=1}^k [\ell_j, \ell_j+1] \right)\right) = 0, $$
where we used that $A \cap \prod_{j=1}^k [\ell_j, \ell_j+1]$ is bounded and hence
$$\lambda\left(\Gamma\left(f,A\cap \prod_{j=1}^k [\ell_j, \ell_j+1] \right)\right) = 0. $$
