For example, with --mdc-theme-secondary: black; It results:

Notice that the right side track container background is still green-ish.
This is because slider's scss is compiled to a constant color for that background. Ideally it should be compiled to css that reflects --mdc-theme-secondary variable. https://github.com/material-components/material-components-web/blob/bfdd2ddce0e20187342224282c6b625008e7f074/packages/mdc-slider/_mixins.scss#L105
Other places correctly takes account --mdc-theme-secondary but not on that line, and I suspect it's due to the use of rgba(...) function there.
Either it shouldn't compile to a constant color, or provide a way to use user compiled scss with their choice of variables for slider material component.