The text below will be translated from French to English using Google Translate.

I've created a buffer that I'm not entirely satisfied with. Ideally, I'd like the chests to empty equally and synchronously. My creation works when the buffer input is no longer powered, but not when the input or output are intermittent. This means that some chests, especially the first two, no longer contain the same number of items as the others.
My creation includes an inactivity detector (middle left in the image). I had the idea of adding this, but I don't know how to incorporate it into this creation. If it helps, I'll leave it here. I've also added an alternator at the output so that you (at least those who will participate) can see how the inserters behave at the output.
I thank in advance anyone who helps me. Please be indulgent, my skills with logic circuits are quite limited.