That is an awesome trick @LucC!
Just to supplement with a solution for vectors whose product is 1.0, the Stan Users Guide has a section (1.7) on parameterizing centered vectors (i.e. vectors that sum to zero) including some useful (but limited) discussion of how to obtain the desired priors on their elements. See here: 1.7 Parameterizing centered vectors | Stan User’s Guide. Exponentiating a centered vector will always yield a vector whose product is 1 (and multiplying by the Nth root of P will yield a vector whose product is P).