Can you point to any official document which states it is illegal? Or any document which mentions any exceptions?
The article lists the "Published works [that] may be used for private use" and that paragraph closes it with:
> This Article does not apply to computer programs.
[1] https://www.fedlex.admin.ch/eli/cc/1993/1798_1798_1798/en#ar...