«I haven't computed it, but you need to take into account the energy it takes to mine a block»
No, because the energy consumption is the same regardless if a block contains zero or a thousand transactions. Therefore it is misleading to attribute mining energy as the "cost" of transactions. And Bitcoin doesn't operate at max capacity: its lightning network is very under-used at the moment.
As to the transaction fee, it is relevant: even though it was already "paid for", it is being redistributed to miners again, therefore drives energy consumption further up than if it was not being redistributed.