While collecting over a thousand SVGs for https://landscape.cncf.io, I found that the SVGs often needed cropping and other optimization. So (with a colleague) I wrote and open sourced svg-autocrop, and made it available at https://autocrop.cncf.io.
Try it out for optimizing your SVGs.