The Energy Recovery System in Formula 1 cars harvests heat from the exhaust (what they call the MGU-H, Motor Generator Unit - Heat) and provides an additional 160bhp:
https://www.formula1.com/en/championship/inside-f1/understan...
https://www.formula1.com/en/championship/inside-f1/understan...
It is not a thermo-electric exchange, it's just kinetic, the same way the electric brake energy recovery works.