Compared to powder, is liquid detergent really better for the health of the washing machine?
Modern machines use so little water that the recommended quantities of powder can lead to a little bit building up below the dispenser drawer because the water has all run before it can dissolve (it also depends where in the drawer you put the powder, with respect to the water jets).  The same machines are usually cold-fill only which further slows the disssolving. Sometimes the rinse water brings the rest of the detergent with it, meaning you don't get a very good rinse. The damp powder can form a caked-on buildup which is harder to shift than the original powder.

Using a little less than stated on the powder box will avoid these effects and save you money on powder, as will liquid (even if you add that via the drawer rather than a dosing ball).  For all but the dirtiest clothes you can use a fair bit less powder than claimed by the people who are trying to sell you detergent.

My machine's quick-wash program wants liquid as there's insufficient time/water for powder to dissolve properly.  I put this in a ball in the drum, which means that the dispenser gets flushed when I use the quick-wash program.  This helps too. This is all in the UK where (almost) all domestic machines are front-loading.