Foxes are coming to your garden because they're finding food - probably insects, worms, and larvae in your beds, or they're picking up the scent of your compost. It gets particularly bad if people are throwing food scraps around in the area. They're active at night because there's less disturbance then and it's cooler. The problem is: once a fox figures out it's worth coming back, he'll keep returning again and again.
The most effective thing is to remove everything that attracts them. Your compost heap absolutely needs to be fenced in or covered - a sturdy lid or wire mesh fence around the whole thing works well. Don't leave food, cat litter, or organic waste lying around openly. Get rid of bird seed and fallen fruit too - that attracts animals from everywhere. Seal up garden furniture and hiding spots so foxes can't get comfortable and settle in.
Then on the practical side: motion sensors with lights or sprinklers can be disruptive, but foxes get used to them pretty quickly. Fences should be at least a meter high and go down tight into the soil at the bottom, since foxes dig. If your neighbors have the same problem, it's better if you all respond together - otherwise the animals just move on to the next garden. In Munich there are definitely environmental advisory services that can help too.