It is possible to find the following: A compact abelian group G with Haar measure $\mu_G$, a subset $S\subseteq G$ of full outer Haar measure and a measurable function $f\colon S\to X$ with $\mu_P(E)=\mu_S(f^{-1}(E))$ for measurable $E\subseteq P$. In fact, as you mention, G can be taken to be a large enough product of the circle group. Here, I am implicitly referring to the sigma algebra $\mathcal{B}(S)\equiv\{S\cap E\colon E\in\mathcal{B}(G)\}$ and $\mu_S$ is the restriction of the Haar measure to $\mathcal{B}(S)$, $\mu_S(S\cap E)=\mu_G(E)$. Ideally, we would like to enlarge S so that it is actually of full measure, then it could be enlarged to all of G. I'm not sure if this is possible though (and suspect that it is not possible in ZFC). The problem is that if $f\colon P\to Q$ is a measure preserving map of probability spaces then $f(P)$ will be of full outer measure, but need not be measurable. If $f^{-1}\colon\mathcal{B}_Q\to\mathcal{B}_P$ is an onto map of their sigma algebras then P and Q are "almost isomorphic" probability spaces. If, however, $f(P)$ is not measurable then f does not have a right inverse, unless we restrict to the subset $f(P)\subseteq Q$. In the following, I write 2={0,1}, so that, for a set I, 2^I is the set of {0,1}-valued functions from I. Letting $\pi_i\colon2^I\to\{0,1\}$ be the projection onto the i'th coordinate, the sets of the form $\pi_i^{-1}(S)$ generate a sigma algebra, which I will denote by $\mathcal{E}_I$. First, we can reduce the problem to that of measures on $2^I$. > Step 1: Given a collection $\{A_i\}_{i\in I}$ of sets generating the sigma algebra on P, construct a probability measure $\mu_I$ on $2^I$ and a measure preserving map $f\colon P\to 2^I$ such that $f^{-1}\colon\mathcal{E}_I\to\mathcal{B}_P$ is onto. Then, f will have a right inverse $g\colon f(P)\to P$ which is automatically measurable and measure preserving. To construct f, define $f(p)\in 2^I$ by $f(p)(i)=1$ if $p\in A_i$ and =0 otherwise. It can be checked that $\mu_I(S)=\mu(f^{-1}(S))$ for $S\in\mathcal{E}_I$ satisfies the required properties. Now, I will use $G^I=(\mathbb{R/Z})^I$, which is a compact abelian group with Haar measure $\mu_{G^I}$, which is the product of the uniform measure on the circle $G=\mathbb{R/Z}$. > Step 2: Construct a measure preserving map $f\colon G^I\to 2^I$. Once this map is constructed, putting it together with step 1 gives what I claimed. For any $J\subseteq I$, use $\pi_J\colon 2^I\to2^J$ and $\rho\colon G^I\to G^J$ to denote restriction to J. Also use $\mu_J(S)=\mu_I(\pi_J^{-1}(S))$ for the induced measure on $2^J$. Zorn's lemma guarantees the existence of a subset $J\subset I$ and measure preserving map $f\colon G_J\to 2^J$ which is maximal in the following sense: for $J\subseteq K\subseteq I$ and measure preserving $g\colon G^K\to2^K$ with $\pi_J\circ g=f\circ\rho_J$ then K=J. Then, J=I and we have constructed the required map. If not, choose any $k\in I\setminus J$, $K=J\cup\{k\}$ and define $h_k\colon G^K\to 2$ as follows (I let $A_k=\pi^{-1}_k(1)\subseteq2^I$). $$ h_k(x)=\begin{cases} 1,&\textrm{if }0\le x_k\le\mu_I\(A_k\mid\mathcal{E}_J\)\_{f(x)}\\\\ 0,&\textrm{otherwise}. \end{cases} $$ Defining $g\colon G^K\to2^K$ by $g(x)_i=f(x)_i$ for $i\in J$ and $g(x)_k=h_k(x)$ gives a measure preserving map extending f, and contradicting the maximality of J.