How to Exclude Files in Sub-Folders from WP Plugin Editor List?

I am not sure you can do that, however, you can turn off/on the editor for plugins or themes using the following in wp-config.php

define('DISALLOW_FILE_EDIT', true );

This will hide the editor in the WordPress admin section.

Remember, this setting is controlled by the site administrator, and it is up to him/her to show/hide the editor, so you do not have control over it.

Also remember, even if you were able to hide the files in the sub-directories, those files are installed on your clients’ file systems. This means that they have full access to those files, not necessarily from within the WordPress admin section, but rather from within the file system. If you are concerned about your code being exposed, then you should fine different ways of protecting it.