Combining classification models and regression (Hierarchical? or MoE modeling?)

Assume, there is a dataset of human poses captured from different angles. For each sample there are 2 level of labels - pose type (standing, sitting, etc) and pose magnitute(continuous).

Defined tasks, are to: 1) classify pose class and 2) pose magnitude (regression). I successfully implemented classification task on dose type with excellent mean accuracy score of 0.95. Now we want to build a model to predict pose magnitude of each class. Here is the tricky thing. I can train separate regression models to predict pose magnitude. But if new sample comes, we do not know to which class of pose it belongs, so we would want to first define its class and then gate it to corresponding regression model. Simplest solution, it to just create a decision rule, that if new sample belongs to class that route it to regressor for this class.
But is there any intelligent way to do it? How can we train routing function simultaneosly with regression models? From MoE paper I got that authors used same smaller classifier for experts. But I don’t understand how to transfer this approach to my problem.

Would me much appreciated, for any feedback.