A groud set of $[0, 1]$ is a set $A \subseteq [0, 1]$ such that $A$ can be written as a finite union of open intervals and single points. For example, $[1/3, 1/3]$ is a groud set since it is equal to $\{1/3\}\cup (1/3, 1/2)\cup \{1/2\}$. Equivalently, its boundary is finite.
A function $f : [0, 1] \to \mathbb{R}$ is a groud function if it is infinitely differentiable, and for every $n \in \mathbb{Z}\cap[0, \infty)$, the set
$\{x \in [0, 1] : f^{(n)}(x) = 0\}$
is groud in $[0, 1]$.
Given two groud functions $f, g : [0, 1] \to \mathbb{R}$, is the set
$\{x \in [0, 1] : f(x) = g(x)\}$
necessarily groud in $[0, 1]$?
The motivation of this question is that I am trying to find a way to formally define "good" sets of space, meaning no exotic properties. Things like spheres, lines, and circles count, but things like the Cantor set or the rational numbers do not. In $\mathbb{R^1}$ this is just the groud sets defined earlier, but it's difficult to find a good definition for $\mathbb{R^n}$ with $n > 1$, and if the answer to this question is "yes", then I have a definition. I know that two analytic functions on $[0, 1]$ must intersect at a groud set, but I'm hoping I can extend it beyond that.