You can make your own powder and primers.
This isn’t rocket science. It’s just chemistry, coupled with some stamping metallic production of small parts.
I’m not going to detail the steps involved. People who worry about these things should read up on primer chemistry - and powder chemistry. It’s not rocket science.
Black powder is even simpler to make - but more dangerous in large lots to deal with.
I think making primers that worked consistently would be extremely difficult and dangerous to do at home.
I realize you can make potassium chlorate with bleach and salt substitute, but being able to salvage primers, prepare them for re-use and form the primer material into a useful and consistent product would take a lot of work, time and material.
I think it would be way more feasible to just resort back to a flintlock type of ignition.