How to perform downsampling in timeseries Collection

Dear All,
I Hope you are going well.
I’m just asking you some advice to perform a downsampling and a densify operation over timeseries “basic” datas.
I got Documents with unique “Value” in it, and records are not cyclic (times between records can vary a lot).
My goal is to get a down sampling base on “start_date” “end_date” and number of samples.

Wich agregate operations are suitables for that?

Best regards,
Oliver