njlhyde
Never done this on a coffee machine but many times with old motorbikes. The solution for an automotive situation is usually either cut a flat slot in the bolt head and use a flat head screwdriver. Drill a hole in it and use a stud extractor or worst case, weld an allen key into it.
Since the torque is likely to be far lower than an automotive application you could try cutting out a small square of thin rubber, from a glove or something, use the allen key to jam it in the rounded hole and see if it bites enough to loosen.
Failing that try supergluing the allen key in, you’ll be discarding the bolt anyway. Then either superglue remover to get the allen key out or just discard that also if it’s a cheap one.
Failing that, if it’s a cap or button/pan head bolt you could try using a Dremel tool (or small hacksaw if there’s space) to cut a slot in and use a screwdriver.
If all else fails, get a bolt extractor set and drill a tiny hole in it, then use the appropriately sized extractor. Be careful as they’re usually fairly brittle.
Be sure to clean out all the metal shavings if you do one of those latter two.
A risky option (as it might damage the surrounding area) is to use vice grips to grab it and loosen it.
Then obviously replace the bolt!