Recently, I used Blender 2.83 to create a background image with many barrels which I did not want to draw by hand. David Revoy wrote a comprehensive tutorial about how to achieve that here: https://www.davidrevoy.com/article305/tons-of-potions-part-1-3d.
However, newer versions of Blender seem to render edges using the Freestyle rendering method. You can find a quick introduction here: https://www.youtube.com/watch?v=emz5metjCk4

In the above setup, you see the settings I finally used to get the desired result. If your background is intransparent, make sure that the ‘Use Alpha’ checkbox (3) is ticked inside the composite node.