really, truly, deeply---clean your drivetrain more often, dont let it get all "erosion paste" like that.
wipe your chain down with an old rag every few rides, takes seconds, use same rag to wipe chainrings, rd jockey wheels, and rag floss the cassette once in a while--all this will go a long way to longer drivetrain life.
and learn to measure a chain over 1 foot to see how much chain wear has occurred, so that you arent wearing away stuff from an overstretched/worn chain.