These are really two different methods for two different things.
The first method is mostly about reducing noise by averaging it out. No "smart layers" in Gimp but once you have the stack you can do a Layer ➤ New from visible and continue the processing with this. If there is a bit of difference between layers this could lead to improving the definition (IIRC this is done as "pixel shifting" in Sony high-end cameras) but using a plain average won't help much (in the Sony implementation they know exactly how they moved the sensor behind an immobile lens between the takes, but in you case it will be random moves with random geometry changes, so registering the layers to make them coincide will likely eat out the extra definition.
The second method is mostly about removing transient "defects", typically (moving) people, when shooting something fixed (buildings, scenery).
No median filter in Gimp itself but there is one in the GMIC filter suite (there is also an average filter). If you feel adventurous there are also my own implementations of average and median in Python.
The first method is mostly about reducing noise by averaging it out. No "smart layers" in Gimp but once you have the stack you can do a Layer ➤ New from visible and continue the processing with this. If there is a bit of difference between layers this could lead to improving the definition (IIRC this is done as "pixel shifting" in Sony high-end cameras) but using a plain average won't help much (in the Sony implementation they know exactly how they moved the sensor behind an immobile lens between the takes, but in you case it will be random moves with random geometry changes, so registering the layers to make them coincide will likely eat out the extra definition.
The second method is mostly about removing transient "defects", typically (moving) people, when shooting something fixed (buildings, scenery).
No median filter in Gimp itself but there is one in the GMIC filter suite (there is also an average filter). If you feel adventurous there are also my own implementations of average and median in Python.