This is available in MuPDF but I would like to see it in okular as well. What would be great to have is if while saving, optionally it can very thoroughly clean a PDF of redundant elements and anything that was previously removed from the PDF and optionally sanitize it of any leftover sensitive data. This is something that would be a welcoming addition to okular. I recall there's another bug about how okular doesn't delete removed PDF annotations, this is something that could be removed when the cleaning happens.