How can I batch render lots of objects individually?
I've written a very basic AddOn, that does basically what you need.


How to use the AddOn:
The AddOn let's you select your files, puts them one after another in your current scene, and renders them to an outpu-directory.
The AddOn adds a button to the Output-Properties-panel.
By clicking it, you open a file-browser-window.

Select all your files you intend to render and press &quot;Select Files to Render&quot;.

Blender then renders all of your selected objects into an &quot;output&quot;-folder, that is created in the same location, that your current .blend-file is located in. The rendered images will be given the objects filename (without the extension). For example &quot;suzanne.obj&quot; may be rendered and saved to &quot;suzanne.png&quot;.
All other rendersettings are taken from Blender directly.
Besides the .stl-format, .obj, .fbx and .blend files are supported.
Disclaimer: Since I don't have that much experience in writing AddOns, I can't guarantee you, that it works flawlessly. As far as I've seen, it works for me.
Code-quality is probably a mess and the AddOn lacks some pleasant UX features as,  for example, render-progress. (Blender is not responsive during the rendering!)

How it works / Code-snippets used
This is a more detailed description of what I did, in case you want to create your own script out of it.
An ImportHelper is used to fetch the different files.
I then iterate over each file,
for file in files: 
    filename, extension = os.path.splitext(file.name)
    filepath = os.path.join(directory, file.name)

create a temporary collection for each object,
collection = bpy.data.collections.new(&quot;tmp-collection&quot;)
scene = context.scene
scene.collection.children.link(collection)

and import the object into this collection.
bpy.ops.import_mesh.stl(filepath)
        
for obj in bpy.context.selected_objects:
    collection.objects.link(obj)
    bpy.context.scene.collection.objects.unlink(obj)

I then render the scene to the output-folder
scene.render.filepath = &quot;//output/&quot;+filename
bpy.ops.render.render(write_still=True)

and delete the temporary-collection with its containing objects.
for c in scene.collection.children:
    if c.name == &quot;tmp-collection&quot;:
        scene.collection.children.unlink(c)

for c in bpy.data.collections:
    if not c.users:
        bpy.data.collections.remove(c)