You’d have to get an SVG or XML parser for node (I don’t think it has one built in unless they added one recently). Then you could parse and manipulate the XML. What exactly do you want to do?
Its a pretty hefty file, though. You might want to break it up into smaller SVG files if you’re seeing issues with performance. Then again, as a bot I’m guessing its not going to be running this too much.
A “no thought” way to do this could be to use Puppeteer… pretty sure it pulls in all of Chromium, so you could both parse the XML, run arbitrary JS on its DOM representation, then render it out as PNG or PDF.
Seems like you could keep a pool of Puppeteer instances around with the SVG already loaded, then scale depending on how much you want to use resources idly.