I don't know about any of the knockoffs, but real black powder is a physical mixture of the components: sulphur, charcoal, potassium nitrate. There is no chemical reaction when it is made, everything is just mixed together and can all be separated back into the original three components. Think of it as mixing marbles, sand and sawdust on a very small particle size level. The individual chemicals remain discrete. If it does not get wet for long periods of time, it will last for many, many years.
My wife tells a story from her high school days. They have a farm just outside Vicksburg Mississippi that was used as a camp, hospital and prisoner exchange by both sides at one time or another during and after the siege. One day her dad found a shell left over from the Civil War. He brought it home and put it on the porch where it dried out over the summer. In the fall, due to his wife's concern about it being dangerous, he decided to show her the powder was bad. He cut out the plug/fuse, poured a little of the now dry powder out on a pie plate and stuck his cigar in it, thereby burning all the hair off his hand and forearm. Now, the shell had been buried for, we presume, decades, maybe 100 years and was damp when found, so the powder might have deteriorated. She said the flash seemed a bit feeble at the time. Since she served on the cannon crew at the Park at the time, and is one of the few people left alive who have fired a live round through those cannons, I have always presumed she knew what she was talking about. Maybe it was still slightly damp.
I have a scant pound of DuPont from the late 1800's inherited from an uncle. It shot just fine the few times I have used it. It can't be replaced, so I don't shoot it any more. That's two data points that says black powder is good for 100 years at a minimum. Replica stuff? Pretty sure that is all made by chemical reaction, which means it is has a reversible component in the reaction kinetics and usually has minor side reactions that occur making various strange dogs and cats. I have to admit I have not really followed the chemistry of substitute products, but it could be an interesting topic to research during the self-isolation days. Anyway, neither of these problems happen in a mixture.
I tried Pyrodex in the late 70's. My ROA rusted overnight. I have never shot anything except Goex ever since. I am sure the cause of the rust was inadequate cleaning, but I never had that problem (rusting) shooting Goex 3f in it. I still have some fake powders left over from the local Cabellas closing. They were closing out at $5 a can and I bought about 10 pounds, about half given away already. I want to try the Golden (citric acid based) as I had heard so much about it, mostly bad, in the day, but never actually seen a can of it until now. I have visions of shooting Tang out the barrel.