Still in the 19. Century for "Müll" we have both, a neuter and a masculine gender whereas its gender today is masculine. Interestingly it also seems to have had a different meaning than today (trash, rubbish).
MULL, müll, n. staub, zerfallende erde, unrat; ein im norden heimisches wort, mnd. mul, gen. mulles Grimm
Note that "Unrat" also meant something different than today.
Looking at a Google Ngram
the change of gender may have occured only recently in the early 20. Century.
Is there anything known why the gender changed? Did this occur at the same time when its meaning of trash, rubbish was introduced?