Limiting the Inrush current of the Boost converter device?
So, you need a boost switching current source. Most chips of this style, like LED drivers, will regulate the output current. But you need regulation on the input current instead.
The boost chip you used will not control its input current, so even after your inrush problem is solved, it will still try to charge the cap at its maximum current, which will crash your power supply.
So, to solve both problems at once, why not use a SEPIC hysteretic converter?

I didn't search for parts or spice models, so I used function sources, but that should work as an example.
L1 and the FET are the usual input stage of a boost converter. However C2 and L2 make it a SEPIC. There is no inrush current because the input is connected to the output through a small capacitor only. This also means shorting the output will not draw high current from the input either. These features make this circuit a good match for your requirements, I think. I won't explain how the SEPIC works, there's plenty of online docs for that.
To control it, the FET has to be switched. This can be done in many ways, for example using fixed frequency PWM, etc. I'll use hysteretic because it is super simple and there are no compensation headaches.
Shunt resistor &quot;Rsense&quot; monitors current in L1, which is also the current drawn from the power supply. Function source E3 models a current sense amp, for example MAX4173 (if you don't like this one, pick one with wide bandwidth). This amplifies the voltage on the sense resistor and references it back to GND. Then E1 models a fast comparator, for example MCP6561. The resistors around it set the hysteresis.
So, here's how it works:
When the current in the inductor is below the set value, it turns the FET ON. When it is above the set value, it turns the FET OFF. Si inductor current zig-zags between the two values, making a sawtooth. Therefore, input current is, on average, constant. You can set the value with the voltage &quot;Iset&quot;.
Frequency is determined by how much hysteresis you put in, the inductor value, and delay introduced by the circuits.
There should be a FET driver, and a suitable FET.
You should pick a comparator or a FET driver with an ENABLE input, to turn the circuit on or off. Especially to turn it off once the output capacitor is charged to the desired voltage.
For only 40mA average it's difficult to keep the frequency below 1MHz without ending up with a large inductor value, so if you prefer a small inductor, you could use a much higher current like 1 Amp, and PWM the thing at high enough frequency that the input current averages to the value you want.