The development of synthetic gunpowder via the Haber-Bosch process, which fueled Germany through two world wars, but only became available to the allies after WW2, means this particular form of rationing is a thing of the past.
https://www.theatlantic.com/health/archive/2014/04/reluctant...
Nitroglycerin was used as a component of smokeless powder -- propellant for bullets, mortar shells, and artillery.
The Haber-Bosch process was used by all belligerents in World War II. Germany was the only operator of the process during World War I, but it rapidly spread throughout the world between the wars.
For the USA at least. The UK was a different issue, as they were actively being bombed and therefore experienced direct shortages.
The US and other countries also used synthetic Haber process ammonia to make nitric acid and explosives from it during World War II.
Here's a 1946 report about American chemical plants and facilities built to support the war effort:
https://catalog.hathitrust.org/Record/001108531
From pages 2 and 3 of the report:
The Government has invested more than $200 million in 10 synthetic ammonia plants, having a combined design capacity of about 800,000 tons of fixed nitrogen per year. These include eight ordnance plants, of which six have been declared surplus, one Defense Plant Corporation plant and one belonging to the Tennessee Valley Authority. Four plants have facilities for producing ammonium nitrate solutions. The nitric acid facilities located in the explosives plants of (2), and the ammonium nitrate graining facilities found in the ammunition loading plants of of (1) have a definite relationship to the ammonia plants.
I did write this!
Also you have no idea if there will be no shortage of gunpowder. Rationing gets applied where the shortages are, and the shortages are many times difficult to anticipate or predict. I get your point and agree it's more likely to be new items, but that's just a gut feeling. In reality shortages can happen on basic products that are easy to manufacture but which a country doesn't manufacture anymore, for example if it's not very profitable.
Nitrate is NO3. It is produced 100% from the air, by a process which is exothermic. So it’s (almost) free, at the margin, or would be if not for the need of pure input gasses.
A Haber-Bosch plant is a factory the size of a city that produces all the fertilizer or explosives you’d ever want, using nothing but air, water, and electricity as input.
We can confidently say that this particular shortage won’t be an issue anymore.