Generating 5V DC in an AC system without the neutral wire
So you have a device that operates in series with a load and must draw it's power from this series connection while turning the load on and off. How do we do that?

When the load is "on" we allow a small voltage drop across our control device. We have a small voltage but lots of current which provides us with the power we need.

When the load is off we allow a small current in the circuit. Now we have a small current but lots of voltage and again we get the power we need.

Note that this approach does have some issues.


The power circuit design will likely be quite complex. It will need to operate under two VERY different sets of conditions, high voltage but low current and low voltage but high current.
The power needed by the control device must be much smaller than the power the load consumes.
The Load must have suitable characteristics. It's voltage/current relationship must be suitable and it must not be adversely affected by small currents flowing when things are nominally turned off. Incandescent light bulbs were fine but CFL and LED bulbs can be more problematic.