Has it a removable soap dispenser drawer (most have) - I had a washing machine once , a second hand one , that had mould and dirt in the soap drawer. I (maybe ott) took the top off the washing machine and the soap dispenser on the left split/came a part (it wasnt glued or sealed) and when I split the dispenser box I could get right inside and clean it and even get to the big black rubber hose between the soap dispenser drawer and the drum - the whole area was black with mould and gunge I gave it, and its spray holes at the the top, and the drawer itself and good spray of dissolved soda crystals in warm water , put it in a sprayer and sprayed all around the soap dispenser box and down right into the rubber hose from the dispenser box to the drum, rinsed it all thouroughly with clean water in another spray bottle, emptied and cleaned out the pump filter at the bottom of the machine, washed the door gasket thoroughly then done a 90c long wash (was over 3 hours wash) with just water alone in the drum (no soap, no vinegar,) and after that the mildew smel had gone on future washes and no black marks on clothes - the washing machine lasted us for years.
If you are going to take top of washing machine make sure you know what you are doing , unplug from wall and watch out for sharp metal edges inside the machine and dont touch anything electrical (even with the plug out of the wall capacitors inside the machine can hold electrical charge) - if you dont want to take top off machine and can remove the soap drawer (most come out by pulling it all the way and then press a little catch to pull the drawer right out) spray the soda crystal mixture all around the inside of the soap drawer compartment and at the bottom where the hose is and put the soap drawer itself in the sink to soak and get all the mildew/mould/soap powder scum off and rinse thouroughly and dry.
What most people dont realise is that when you put a hot wash on in the drum to try and get rid of mould and the smell , that hot water goes around the drum and the door gasket but does not even reach the soap drawer nor the pipe between the soap drawer and drum and if these are mouldy or have soap scum residue , when you do a wash the water (especially if you have a strong cold mains water pressure) flows into the soap drawer compartment and the soap drawer and 'dislodges' flecks of mould and old soap scum and powder and that goes right into the drum. - hope this info helps and it might be worth a try before totally condemning the machine. - Good Luck!