Why won't kern.maxfiles setting in /etc/sysctl.conf stick on macOs 10.15?
I found the solution. Actually sysctl.conf file works when starting the computer in safe-mode.
So i removed the sysctl.conf and then removed all launchDaemons and started the computer normally. Suddenly the defaults for kern.maxfiles and kern.maxfilesperproc
where around 200000/100000.
I copied one after the other launchDaemon back and restarted.
It turned out that two .plists caused the values to go down to 10240, wich are related to Anydesk:
com.philandro.anydesk.Helper.plist
com.philandro.anydesk.service.plist

I contacted the developers of Anydesk about my findings and hope they will optimize their software.