I had also tried your approach to loop over the feature collections, but if you have set the "maxFeatures" parameter, the feature collections only contain the number of maxFeatures.

Thank you for the hint about multiple feature types. I will fix the code to support them.