Catalyzes the NADPH-dependent reduction of trans-2-enoyl thioesters in mitochondrial fatty acid synthesis (fatty acid synthesis type II). Fatty acid chain elongation in mitochondria uses acyl carrier protein (ACP) as an acyl group carrier, but the enzyme accepts both ACP and CoA thioesters as substrates in vitro. Displays a preference for medium-chain over short- and long-chain substrates (PubMed:12654921, PubMed:18479707, PubMed:27817865). May provide the octanoyl chain used for lipoic acid biosynthesis, regulating protein lipoylation and mitochondrial respiratory activity particularly in Purkinje cells (By similarity). Involved in iron homeostasis; affecting Fe-S cluster assembly and ceramide metabolism (PubMed:37653044). Required for proper morphology and bioenergetic functions of mitochondria (PubMed:37653044). Required for maintenance of neurons (By similarity). {ECO:0000250|UniProtKB:Q9DCS3, ECO:0000250|UniProtKB:Q9V6U9, ECO:0000269|PubMed:12654921, ECO:0000269|PubMed:18479707, ECO:0000269|PubMed:27817865, ECO:0000269|PubMed:37653044}. This is the function of MECR (mitochondrial trans-2-enoyl-CoA reductase, Ensembl gene identifier ENSG00000116353).