Yes extremely frustrating and not easy to understand, for an existing antiviral its not so bad as the pathways to synthesise the drug are already in place. However new drugs are a bit different.

These drugs are very complex molecules.

This is basically how drugs work.

The drug shown here is quite a simple one and is shown as a flat depiction. The way the drugs work is by fitting to the virus in a specific way with a specific shape.

In this pic the drug is geometric shape in black and white and it fits into the shaded coloured areas that are o the left.

So the drug works by jamming itself chemically and physically into the virus.

To make the new drug there will be a series of steps, say 6, to assemble it. Each step is unique and by adding two or three molecules together under specific conditions you get completion of that step.
How much you get varies and adding the molecules together gives more than one outcome because the have a shape. Its probable that only one shape works so the others are wasted.

So basically if you start with 100 of these and get 70 % yield you get 70 to work with perhaps only half of those are the ones that work so you get 35 that you can add into the next step.
Do that 6 times and you get less than 1 remaining from your 100 starting molecules. (0.18 actually).
Remember most drugs are for specific disease that affects probably less than 1% of the population.

Each step is different and new and has to be optimised and each sequence has to be built into a production line.

We need tons of these things to treat not just less than 1% but 50-60-70% of the worlds population.

Not easy to do quickly.

PS Sometimes you can get bacteria to help make these drugs but thats a whole new project.

Is there anything to stop unapproved treatments for critically ill patients?

I dont think you could give a patient anything that hasnt gone through safety i.e. you just haven’t tested for efficacy

Here are the phases :
Pre-clinical testing (pre human) in vitro, in vivo
Phase I Testing of drug on healthy volunteers for safety; involves testing multiple doses (dose-ranging)
Phase II Testing of drug on patients to assess efficacy and side effects
Phase III Testing of drug on patients to assess efficacy, effectiveness and safety

I had a quick look on-line and it seems that you can try drugs for life thrreatening situations in phase 3, and in certain circumstances phase 2 – but I’m out of my depth now!