i have had a sealed container of white sugar for about 5 years now, we have been using it slowly, but is it safe/healthy to continue using it because of its age? or should i replace it?
White sugar was commonly used as a preservative in the past, in much the same way as salt. It's wildly hygroscopic (like salt), and an excellent desiccant, so if you packed something in it, it would accelerate the drying process. This is actually the origin of fruit jam and fruit preserves, which are still common today, even after better methods of preservation are available.
Salt was more common simply because many things like eating/living in WET sugar, so you had to be careful with how much water was in the thing you were trying to preserve. But as long as the sugar was dry it's an extremely hostile environment for bacteria and little crawly things.
Kept dry, it will last forever.
Various references, including this one from Lantic sugar note the shelf-life of granulated white sugar as indefinite or effectively forever.
Presuming, likely, that it is stored as you note in a sealed container.
As long as the sugar is dry, there is nothing that can go wrong with it that will not be immediately visible. If ants, flies, cockroaches get at it, it'll be pretty obvious. Invisibles like bacteria or virii can't live on dry sugar, and the same goes for fungi, as it tends to soak up al of the moisture from anything trying to live on it.
Basically, as long as it's white and nothing is crawling on it, it's fine.
Sometimes I think that food manufacturers put a best before date on stuff just to make people feel better, or buy replacements every so often.
Somewhat counter-intuitively, bacteria can't grow really well in an environment that's pure sugar. Just keep it dry.