There are explicit exemptions in Swiss law for the kind of situations you're describing.

https://www.fedlex.admin.ch/eli/cc/24/233_245_233/en#art_28