It is not obvious that the chain rule is valid for distributions. But in this case it actually is.
Assume that $f \in C^1(\mathbb{R})$ changes sign at $x_i$ for $i \in I$ (finite or countably infinite). Then
$$
(\theta \circ f)'(x)
= \sum_{i \in I} \operatorname{sign}(f'(x_i)) \, \delta(x-x_i)
.
$$
On the other hand, formally by the chain rule, in a neighborhood of $x_0$ we expect to have
$$
(\theta \circ f)'(x)
= (\theta' \circ f)(x) \, f'(x)
= (\delta \circ f)(x) \, f'(x)
.
$$
Are these right hand sides equal? Actually they are. By a formula that can be found in Dirac Delta Function of a Function we have
$$
(\delta \circ f)(x) \, f'(x)
= \left( \sum_{i \in I} \frac{\delta(x-x_i)}{|f'(x_i)|} \right) \, f'(x)
= \sum_{i \in I} \frac{\delta(x-x_i)}{|f'(x_i)|} \, f'(x_i) \\
= \sum_{i \in I} \frac{f'(x_i)}{|f'(x_i)|} \,\delta(x-x_i)
= \sum_{i \in I} \operatorname{sign}(f'(x_i)) \,\delta(x-x_i)
.
$$
Thus, to answer your question: Yes, it is correct that $\delta(f(x)) \, f'(x) = \delta(g(x)) \, g'(x)$ if $f,g \in C^1(\mathbb{R})$ and $\theta \circ f = \theta \circ g$ (e.g. if $f$ and $g$ have the same zeros, and $f'$ and $g'$ have the same (nonzero) signs at the zeros).