This question is about the universal property of the product-$\sigma$-algebra of measurable spaces, very similar to the product topology.
Let $(A,\mathcal{A})$ and $(B_i,\mathcal{B}_i)$ be measurable spaces for $i$ in an arbitrary index set $I$ and $(\Pi_{i\in I}B_i,\otimes_{i\in I}\mathcal{B}_i)$ the product-$\sigma$-algebra measure space ($\Pi_{i\in I}B_i$ cartesian product space and $\otimes_{i\in I}\mathcal{B}_i$ the smallest $\sigma$-algebra, such that all projections $\pi_i$ are measurable)
Is this in general a product with regard to category theory. To put it different: If we define $f_i:A\rightarrow B_i, f:A\rightarrow \Pi\ B_i$ and $\pi_i\circ f=f_i$ in any of the two directions, does
$$f_i \text{ measurable } \Leftrightarrow f \text{ measurable } $$
hold? For $|I|<\infty$ its certainly true, but I am not sure about the general case. Thanks in advance!
Yes.
If $\prod_{i\in I}B_i$ is equipped with $\otimes_{i\in I}\mathcal{B}_i$ then the projections are measurable, so if $f$ is measurable then so are the compositions $f_i=\pi_i\circ f$ for $i\in I$.
Conversely if $f_i=\pi_i\circ f$ is measurable for all $i\in I$ then: $$f^{-1}(\bigcup_{i\in I}\mathcal \pi_i^{-1}(\mathcal B_i))\subseteq\mathcal A$$
Consequently: $$\sigma(f^{-1}(\bigcup_{i\in I}\mathcal \pi_i^{-1}(\mathcal B_i)))\subseteq\mathcal A$$
Next to that we have: $$\sigma(f^{-1}(\bigcup_{i\in I}\mathcal \pi_i^{-1}(\mathcal B_i)))=f^{-1}(\sigma(\bigcup_{i\in I}\mathcal \pi_i^{-1}(\mathcal B_i)))=f^{-1}(\otimes_{i\in I}\mathcal{B}_i)$$
So we end up with: $$f^{-1}(\otimes_{i\in I}\mathcal{B}_i)\subseteq\mathcal A$$ which is exactly the statement that $f$ is measurable.