I have done some more research about this question and here is my (partial) conclusion.

The theorem as I stated it in the body of the question is probably wrong (or still open) because it's too general. The only form of the theorem that seems to be known is essentially the original one in the paper of [Lehmann and Scheffé] linked by Iosif Pinelis (where they get a possibly non-measurable $\phi$).

Of course from there one can obtain an obvious corollary for the measurable case, which I state below but which adds nothing to the original version.

If a set function $S:\mathcal{X}\to E$ satisfies condition $(\star)$, if $L^1(\mathcal{X})$ is separable, and if we endow $E$ with the final $\sigma$-algebra $\mathscr{E}$ ($A\in \mathscr{E}$ if and only if $S^{-1}(A)\in\mathscr{X}$), then $S:(\mathcal{X},\mathscr{X})\to (E,\mathscr{E})$ is a measurable sufficient statistic which is "measurably minimal" in the class of all measurable sufficient statistics $T$ with the final $\sigma$-algebra on the codomain, meaning that $S=\phi(T)$ for some measurable $\phi$.

I haven't found anything about the general case where the codomains are endowed with arbitrary $\sigma$-algebras. In facts, after consulting some of the main references in the field ([1], [2], [3]) I am now more or less convinced that the right way of thinking of minimal sufficient statistics in this theorem is in terms of set functions, not of measurable functions. I have also found that the concept of minimal sufficient $\sigma$-algebra, which is to be the standard approach to minimality in the most recent papers, is equivalent to the one of "measurably" minimal statistics on Polish sample spaces (see Theorem 4 in [Rogge] - and [Landers and Rogge] for a counterexample when the space is not Polish).

[Lehmann and Scheffé]:https://www.jstor.org/stable/25048038
[1]:https://www.jstor.org/stable/25048038
[2]:https://projecteuclid.org/journals/annals-of-mathematical-statistics/volume-25/issue-3/Sufficiency-and-Statistical-Decision-Functions/10.1214/aoms/1177728715.full
[3]:https://projecteuclid.org/journals/annals-of-mathematical-statistics/volume-20/issue-2/Application-of-the-Radon-Nikodym-Theorem-to-the-Theory-of/10.1214/aoms/1177730032.full
[Landers and Rogge]:https://projecteuclid.org/journals/annals-of-mathematical-statistics/volume-43/issue-6/Minimal-Sufficient-%7csigma-Fields-and-Minimal-Sufficient-Statistics-Two-Counterexamples/10.1214/aoms/1177690882.full
[Rogge]:https://link.springer.com/content/pdf/10.1007/BF00536560.pdf