I think the gist of the discussion is that you can’t know the # of variadic inputs, but you can discover which pin you are currently on (which gives you total when on your last pin, but you don’t know it is the last pin). To get the “current” pin number, you need to have “fake” input/output pins; add 1 to the fake input & feed it to the fake output. I requested method to get this info (like output pins on variadic node for current level & #pins), but it has not yet been provided.
gweimer/utils library has examples of buffers. running-avg uses variadic like you are suggesting (see example nodes for usage). It only works for FIFO-style buffer (First In, First Out). If you want a stack (Last In, First Out), you need to be able to push data both directions & I don’t think variadic can handle that.