1. Use a wax lube like Squirt and it won’t get so mucky in the first place 😉
2. Washing up bowl, water, dash of fairy liquid*. Soak, scrub, job done.
Not that I clean them like this very often. Only really if I have reason to take the cassette off and it’s still good to use.
With Squirt lube a lot of the time, a quick hose down on the bike and the cassette and chain are shiny anyway.
* – yeah yeah, blah blah, salt in the stuff will eat it. Balls to that. Never had a problem in the years I’ve been doing it.
p.s….
3. Stop cleaning your bike/components so much. Just ride it. 😛