Alternatively, this is the exact ideal application for hierarchical Bayesian modeling. It’s the middle ground between the traditional stratification/aggregation decision.
This is a pretty approachable overview: https://casrai.org/guides/bayesian-hierarchical-models
Andrew Gelman has several books covering this topic in great depth as well.