Yes after thinking about it some more I think my diagram is not correct- I think the electrolysis of NaCl in solution will only produce HOCl and Chlorine at the same time, and only when when the HOCl is completed it will start to break it down to form HCl and at that point the Chlorine production will stop. So I think perhaps he uses fresh HCl in the leaching chamber and the HOCl and Chlorine produced by the cell are sent to it.
What are you using for a membrane?
I can't try anything at the moment, but I would like to experiment with a very basic setup using a terracotta pot for the membrane, sitting in a bucket of NaCl electrolyte and filled with the same electrolyte; with an inverted funnel to collect the Chlorine gas, and bubble it through a second vessel containing HCl and the material to leach. But that would only be using the Chlorine, to use the HOCl as well I think would need a pump of some sort.
Here is a video of making sulfuric acid using a terracotta pot as a membrane in a somewhat similar way, a very simple setup:
Video