One of the biggest misconceptions on retrofitting guards is modifying older guards to comply with the 4-inch sphere without engineered supervision, and though a permit might not be needed, I always suggest going through the process of applying for one and then being told you don't need one by the AHJ; aka: the building department. If something odd happens down the road, the Monday morning oversight of being informed one was not needed, get it in writing, is simpler to explain than we didn't get one.
As to what I have seen first hand, many of the older guards built with large sphere spacing have improper structure to hold the additional weight of added infill, as they also normally have larger support post spacing combined with smaller post size than would be required with todays codes. Thus, just adding infill without complete review can be also be the undoing of a simple fix. Engineered review and plans are a must!!!!
example: In NJ on a masonry front entry porch/stoop, lets say 3 steps and a platform, normal everyday home in that area. A contractor is allowed to pull the entire top landing, treads, façade brick, even replace block work and concrete, as long as, they don't change the size or change or modify the foundation; without a permit, it is considered a repair because the foundation was not touched. However, to install new handrails/guards on the so called repaired porch/stoop we have to pull a permit. I am telling you 75% of the mass replaced and no permit required does not make sense to me.
Though a permit might not be needed, its a life safety upgrade on the property, to obtain the permit you will be required to have a complete set of engineered drawings that are stamped. The cheapest insurance policy you can get is a issued permit with a final inspection that you as the purchaser did everything properly by the book, get one IMO if they will issue it. If they wont, get a letter one was denied to be issued because it was not required.
I learned this lesson early in life and it has served me well, the building department is your friend, not your problem. It is simpler to explain why the town wouldn't issue it with paperwork, than just words. You still need all the engineer review to make certain that the retrofit is not going to cause a set of other issues. So in reality the permit is the minor cost.
Just my 2 cents
Tom