Coffee is in the cafeteria or filled/cleaned on breaks and lunches. The machine makes a cup at a time so it isn't sitting around. It can't be in the production area anyway since it has the possibility of either messing up the machines or messing up the actual product (chocolate and candy) and ups the chance of making a customer sick.
Yup, sometimes you see the mechanic working or someone fixing the machine. Untrained folks can't help. Sometimes the problem is in another section of the factory which you aren't trained on or even see. Can't exactly help that nor can you generally leave the production area without absolutely knowing you'll be down for some time. Then there are generally a few things to do, but since it requires moving staff, this is a last resort as it would negatively affect production.
The place is obviously designed for nearly 100% production during all shifts that are scheduled (not always 24 hours), obviously allowing time for startup, shutdown, and cleaning.
A well run factory doesn't have excess work for every employee every day. It will aim for as little downtime as possible and not having excess employees. Excess work, every day for every employee means some things just can't get done if you don't have downtime.
That's the whole problem, right there. Sometimes, this "well run" company will generate work that might not matter, not at all.