I am asking about front loaders. I have heard that powder builds up and it is worse than liquid, although I hear mixed arguments nowdays so I wondered if using liquid detergent is actually better for the washing machine, not the clothes.
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.
There are two types of powdered laundry detergent, regular and HE (High Efficiency). If you have a front load high efficiency washer then you should buy laundry detergent labeled HE. The HE detergent is more concentrated which means you need much less than the non HE detergent. Build up shouldn't be a problem with HE detergent.