averaging circuit when number of inputs is dynamic
It's old technology now but the AD633 multiplier is capable of division.



Figure 1. AD633 block diagram.

For division you put the multiplier in the feedback loop as shown in Figure 16 of the datasheet.



Read and understand the datasheet and device constraints carefully before you jump in.

I think if you search this site for the AD633 you will find recommendations for more recent devices that have better performance.