Can't tell if this is intended a little tongue-in-cheek but are you implying that in some locales, cocaine is still used medically for it's stimulating effects? Because it was my understanding that the use of this particular property was essentially gone from modern medical practice because of undesirable cardiovascular effects, with the only remaining use cases being in some otolaryngic or perhaps dental surgeries that make use of it's local anaesthetic properties when nothing else will do.
O yes, indeed . . . it is possible for a physician or nurse in hospital and in a hospice situation in particular to get Brompton Mixture and narcotic-cocaine IV mixtures whipped up by the dispensary when needed.
But, at least in the United States, there is another law there which makes it so that a mixture in which cocaine is an ingredient cannot be prescribed on an outpatient basis. Most assuredly, the days of being able to walk into Walgreen's with a prescription for powdered C-Jam in the form of tablets or capsules, not to mention loose powder, are long gone.
The stimulant and even empathogenic properties of C-Jam are still well known to quite a percentage of physicians and dispensary people, and is listed as a stimulant or CNS agent in official formularies in lot of cases. In Canada and Europe in the past, I have indeed had liquid mixtures with four or more other ingredients plus cocaine prescribed in small quantities as an ad hoc cure for orthostatic hypotension and somnolence when I was in the midst of a rapid increase in my narcotic dose, but it soon became apparent that caffeine plus ephedrine or racaemic amphetamine did a better job with the hypotension at least.
I can imagine that a lot of the substitutions of the cocaine in the prescription of Brompton Mixture, especially now in the United States, are done for political (CYA) purposes and some insurance companies will balk at covering such a mixture. For that reason, I have long had a small to middling-sized stash of methylphenidate and a few tablets each of methamphetamine, amphetamine, and dextroamphetamine from prescriptions over the years to be used in just such a case -- and cocaine and the amphetamines have direct potentiating effects on narcotics. One issue with cocaine is the brief duration of action.
I am guessing that the cardiotoxicity of cocaine is a distant second reason for this being the case. QT interval prolongation is another issue with these and other similar drugs. These appear to be most pronounced in the esters of benzoic acid, one of the four categories of local anaesthetics; the fact that most all of the local anaesthetics are sodium channel blockers can possibly be one of the reasons. There are, in fact, drugs of these chemical subclasses which are used for the exact opposite in certain cases -- procainamide and quinidine are commonly-used Class Ia antiarrhythmics and lignocaine is in Class Ib.
Cocaine first fell out of favour for a given medical use at the turn of the XX. Century when it was discovered that it could cause sloughing of the cornea, and about this time, the first cocaine analogues were discovered, and many were more useful for operating on the eye. I am thinking that eucaine was the first semi-synthetic or synthetic local anaesthetic, discovered in 1900.
Cocaine is, to cite one example, CSA Schedule II in the United States and similarly controlled elsewhere -- it is most commonly used as Tac (Tetracaine, Adrenaline & Cocaine), Tac and neat cocaine both come in 4 and 10 percent solutions for ear, nose & throat surgery, and once a chemist working in the dispensary of the hospital showed me a 60 gramme bottle of powdered cocaine -- and there is a new pure mixture, C-Topical Solution, I believe that in the United States which went on the market in 2016 for intractable nosebleeds. So in those cases the vasoconstriction and local anaesthetic powers are the ones sought out.
There are, I believe, pre-saturated cotton swabs and planchettes (also called tampons) of cocaine which are used in dentistry in addition to liquids which can be painted on to an area like Tac. There are phials and ampoules of sterile injection solution for use in place of other things like novocaine, which became the dominant infiltration local anaesthetic worldwide beginning in the early 1930s as well. Indications for using Bolivian Marching Powder in that case appear to be related to extreme bleeding, as it is much more of a vasoconstrictor than some of the others.
Back at the beginning, the most common cocaine OTC products were specifically intended for insufflation, such as the Grey and Birney Catarrh remedies, both of which came as bottles of powder with an apparatus for applying it consisting of a glass tube connected to a small rubber hose so that the patient could get a quantity of the powder into the apparatus then blow with their mouth to get the nose candy deep into the sinuses to solve the problem.
The narcotic in the Brompton Mixture is also sometimes changed for a specific situation; I have heard of methadone, diamorphine, phenadoxone, dipipanone, hydromorphone, oxymorphone, dextromoramide, pethidine, and ketobemidone switched in for patients with allergies or other trouble with morphine derivatives, The piperazine antihistamine cyclizine, as well as its close relative hydroxyzine, can be used as both an anti-emetic and a narcotic potentiator. Cyclizine is the second ingredient in Diconal (dipipanone) and Cyclomorphine (morphine) proprietary fixed combination products.
Cocaine hydrochloride apparently does or did come in containers of up to 500 grammes, as one of these was snagged by chemist shop burglars in the United States in 1990-ish according to the Canadian and US newspapers, and they cleaned out the whole place, including taking beta blockers, laxatives, antibiotics, and all sorts of other things in addition to the apparent objective of getting all of the narcotics, barbiturates, benzodiazepines, and stimulants. The haul was apparently close to $1m street value . .
In the United States, there are in fact a number of Schedule II narcotics and other drugs which are simply not manufactured at this point but could, and some in III, IV and V as well and some uncontrolled ones too. Phencyclidine is one, as are phenazocine, bezitramide, metopon, alphaprodine, anileridine, piminodine and other narcotics, glutethimide is in Schedule II, methyprylon and ethchlorvynol are in Schedule III, Pyrovalerone is in schedule V, there are amphetamines not in use which range from uncontrolled to Schedule II, and I believe that the narcotic proheptazine was in Schedule IV for some time and has uncontrolled relatives like ethoheptazine, and so on.
And all of the above are under the closed system of the Controlled Substances Act 1970 in the United States -- other countries which allow off-licence prescription and a little more leeway for physicians, chemists, manufacturers will have a somewhat different situation.
The effect of dopamine on pain and what it does to the nervous system in particular may be the beginning of an answer to the OPs question.