Is there an add-on for batch STL importing?
Start with importing obj file:bpy.ops.import_scene.obj

Then you export the scene with bpy.ops.export_mesh.stl : doc

After doing this, you need to delete all instance inside your scene and loop the process again. Should be a fairly easy add-on without tricky point.