This is not intended to be a full answer, more like a thought experiment that is too long for a comment.
As @ParclyTaxel mentioned, functional square roots abound, but sometimes they are very difficult to find. Let me expand on this point via a simple example.
Consider the function $g:\mathbb C\to\mathbb C$ defined on the whole complex plane as $g(x)\equiv -x$ for each $x\in\mathbb C$. It is very easy to find a function $f:\mathbb C\to\mathbb C$ such that $f\circ f=g$; define $f(x)\equiv\mathsf ix$ for each $x\in\mathbb C$.
However, what if $g:\mathbb R\to\mathbb R$, still defined as $g(x)\equiv -x$ for $x\in\mathbb R$, is restricted to the real line? A solution to the functional-square-root problem still exists, but the answer is way less obvious in this case.
To exhibit one such solution, first note that the intervals $(0,1)$ and $[1,\infty)$ have the same cardinality, so that there exists a bijection $h:(0,1)\to[1,\infty)$ between them. Denote the inverse as $h^{-1}:[1,\infty)\to(0,1)$. Define $f:\mathbb R\to\mathbb R$ as follows:
\begin{align*}
f(x)\equiv\begin{cases}h^{-1}(-x)&\text{if $x\in(-\infty,-1]$},\\-h(-x)&\text{if $x\in(-1,0)$,}\\0&\text{if $x=0$,}\\h(x)&\text{if $x\in(0,1)$,}\\-h^{-1}(x)&\text{if $x\in[1,\infty)$.}
\end{cases}
\end{align*}
It is not difficult to check that $f\circ f=g$, but, as you can see, the answer is less straightforward than it was in the complex case.