May I suggest that you look at chapter 16 of Baddeley, Rubak & Turner (2015) Spatial Point Patterns: Methodology and Applications with R. Specifically Section 16.8 Analysing summary functions from replicated patterns seems very relevant to what you describe here. In that section you will learn about the generic function
pool (with methods
pool.envelope) that you can use to pool the estimates correctly. If you don't have access to the book you can have a look at the relevant vignette:
Please be aware that the envelopes we provide by default in
spatstat are NOT confidence envelopes! These are simulation envelopes under a given null model and indicate (by default) the pointwise non-rejection region of a Monte Carlo test. Again this is explained in detail in the book in chapter 10, but you can also find a short discussion explaining the difference in Section 7.3.3 Use of the empirical K-function which has the advantage of being part of the free sample chapter 7 downloadable from the companion website http://book.spatstat.org
Disclaimer: I'm coauthor of the book mentioned above, but this is not (only) from shameless self promotion -- it is also the definitive reference on
spatstat, so it is very relevant if you use
spatstat to do your actual calculations.