$\newcommand{\al}{\alpha}$In [leo monsaingeon's answer], for the the value $J(\al)$ of the infimum it was shown that \begin{equation*} J(\al)\le9 \end{equation*} and conjectured that \begin{equation*} J(\al)\to9 \end{equation*} as $\al\downarrow0$.
This is to confirm the conjecture and, moreover, to provide an explicit lower bound on $J(\al)$:
\begin{equation*}
J(\al)\ge9(1-\al)-\tfrac{3\pi}2\,(32\pi\al)^{1/3}. \tag{$*$}\label{*}
\end{equation*}
Let \begin{equation*} \text{$a:=\pi/3$ and $b:=2\pi/3$.} \end{equation*}
Lemma 1: If $f$ is absolutely continuous on $[a,b]$ with $\int_a^b f^2\le\al$, then \begin{equation*} \int_a^b f'^2\ge\frac{(f_a+f_b)^4}{64\al}. \end{equation*} Here and in what follows, \begin{equation*} \text{$f_a:=|f(a)|$ and $f_b:=|f(b)|$.} \end{equation*}
Lemma 2: If $f$ is absolutely continuous on $[0,a]$ with $\int_0^a f^2\ge c^2$ for some real $c\ge0$, then \begin{equation*} \int_0^a f'^2\ge9(c-f_a\sqrt{a/3})_+^2\ge9(c^2-2cf_a\sqrt{a/3}), \end{equation*} where $u_+:=\max(0,u)$.
Lemma 2': If $f$ is absolutely continuous on $[b,\pi]$ with $\int_b^\pi f^2\ge 1-\al-c^2$ for some $c\in[0,\sqrt{1-\al}]$, then \begin{equation*} \int_b^\pi f'^2\ge9(1-\al-c^2-2\sqrt{1-\al-c^2}f_b\sqrt{(\pi-b)/3}). \end{equation*}
It follows from these lemmas that \begin{equation*} \int_0^\pi f'^2\ge B(u):=9(1-\al)+\frac{u^4}{64\al}-2\pi u, \end{equation*} where $u:=f_a+f_b$. Minimizing $B(u)$ in $u$, we get \eqref{*}.
It remains to prove the lemmas, which will be done later.