And if you need more developer time is also a consumption of energy.
I think a more common problem is relying on general frameworks regardless of platform. Frameworks solves a general problem, but you solve a specific problem, as your example shows.
How much would it save to use SQL SELECT with the columns you need instead of a ORM that fetches everything?
Or what about API endpoints that deliveries everything to single page app that only needs a few values?
Most data deliveries online today is never used only to be discarded. And you have that discarding of data at two different places, between the database & the backend and then between the backend and the client. That is probably a higher cost than changing server language.