How to make an object (triangle) transparent inside leaving angles highlighted?
You could mark the edges as Freestyle. You have options: in EEVEE, you can render the layer on its own, by unchecking all other passes in the View Layer Properties tab, or in Cycles, as illustrated here, you can check 'As Render Pass'.
In this example, 'Film' is set to 'Transparent' in the Rendering tab, and the Freestlyle layer is laid over an Input&gt;RGB node  black in the compositor.

(Blender 2.92)