Currently, Kmail (19.04.2) notifies about mails in all folders. This can be configured per folder settings -> "Act on new/unread mail in this folder". Maybe you can connect this with the preferred folders panel: The notification/setting is off by default but enabled if the folder is added to the preferred folders. Of course, the config option can be switched manually, too, but I think, the preferred folder approach is more user friendly (especially, when having a lot of folders).