It’s common for washing machines to become a hotbed for mold, which is what causes the unpleasant sulfur smell. Other things can build up in the washer as well, which you’ll need to watch out for.
This can happen especially if you’re using the wrong kind of detergent which produces a lot of suds. Instead, use a higher-efficiency detergent and it might even be an idea to skip the softener.
If you’ve successfully cleaned the washing machine, and it still has that nasty sewage smell, then there might be an issue with the plumbing. The issue will either be with the drainpipe, or the vent pipe.