That’s making MDF you’re thinking of.
Turns out it is a similar process…
Process
Cross-linking is the chemical process to produce textiles with wrinkle resistance.[12] Wrinkle resistance is achieved by the crosslinking of cellulose chains to stop the molecules from moving when in contact with water or other environmental stress.[13] Cotton cellulose polymer comprises three different regions: the crystalline region, the amorphous region, and an intermediate region between them. Although in the crystalline region the cellulose chains are closely arranged, limiting their mobility, chains in the amorphous and intermediate regions are bonded together by weaker bonds making them more susceptible to breaking.[14] There are two types of crosslinkers, which are the chemicals that bond together cellulose chains, the first ones only bond cellulose chains, while the second self-polymerize resins as well.[13]
N-methylol and DMDHEU are reagents commonly used for the treatments because of their relatively low costs; however, they produce free formaldehyde,[14] which has been identified as a potential human carcinogen, and it can also cause harmful dermatological effects.[15] The use of titanium dioxide (TiO2) (as a catalyst/ co-catalyst for these reactions) has become an alternative way to minimize the formation of free formaldehyde and fabric strength loss.[14]
Dimethyloldihydroxyethyleneurea (DMDHEU) is the most commonly used durable-press finish. In this process, the chemical is first applied to the fabric. Then the fabric is heated to allow the chemicals to react with the cellulose molecules. In the reaction, the molecules of the fabric are bonded together to keep them from moving and causing wrinkles.[10][16] For this reason, durable-press treated garments behave as synthetics.[10] However, almost all the wrinkle resistant garments are made with poly/cotton blends fabrics.[17]
There are problems with the post-curing process, the final step of the treatment, because if the process is not done perfectly the garment gets damaged and can even turn yellow.[17] Companies have overcome the post-curing issues by producing wrinkle-resistant clothes using pre-cured fabrics.
https://en.wikipedia.org/wiki/Wrinkle-resistant_fabric#Chemistry