It wasn't niche. In the US cocaine was available just about everywhere - pharmacies, grocery stores, mail order, being used (in high quantities) in dozens of beverages, and so on. [1] By the time of its effective prohibition it was seen by many as the largest health crisis in existence.
I suspect the numbers you're citing are subject to a large number of biases - different demand/utilization in different areas, considering mass without purity, poor recording keeping and/or off the book deals, and so on.
Demand / Use are the key metrics, not availability.
If you have those numbers, then you have a point.
Again saying everyone was using a ton of coke back then, doesn't really line up with reality. Yes it was sold openly in pharmacies until 1914, and seen as a problem. Estimates from the time (1900) show 200,000 people (~0.3% of a ~76 million population) were regular addicted users. Compared with 2020's numbers: 6 around 6 million Americans use cocaine on a regular basis (1.8 percent).
Way more people are using it now than then.
https://pubmed.ncbi.nlm.nih.gov/8473543/ https://recovery.org/cocaine/history