Hi,
I actually encountered a few similar problems. I don’t understand your proposal very well, but I think it is better solved by modifying the models instead of adding some additional syntax to Stan. The two things that usually helped me are:
- Using centered parametrisation for (parts of) the model, especially when there are a lot of data points observed from the group (the reasons why this helps is explained at Hierarchical Modeling)
- Enforcing a sum-to-zero constraint on the random intercepts (either soft or hard as discussed at Test: Soft vs Hard sum-to-zero constrain + choosing the right prior for soft constrain. This changes the interpretation of the model and I have yet to completely understand exactly how, but it seemed quite sensible for some of the use cases I worked with. Also the R-INLA package actually does this as default and the authors seem to know what they are doing :-)
- Both of the above.
Would that fit your intuition about the problem?