Hover over the outliner and press C to make a new collection without moving any objects into it. (in blender 2.835 anyway) Just pressing M gives an error 'no objects selected' as in the answer stated above.
Click this button and you will get dropdown for restriction tools
Click on monitor looking icon.
Now you can see additional icons for your objects and collections.
Greyed out object should have monitor icon disabled
Enable the icon to make objects/collection visible again.
Now, you may ask what's the difference between Eye icon and Monitor icon visibility....
I'm focusing on a multiple obj import and need to strenghten a bit the routine you published.
The idea is:
Import OBJ recursively scanning on multiple subfolders, ONE by ONE
Apply Lily Texture Packer Plugin for each object imported and link to newly created material
Delete any other unused material
Save Lily Textured file .png in the same folder
Export a new ...