Being a dolt here - caustic soda?
Better known as lye, worse known as sodium hydroxide; it’s been used from old time to do laundry. I suppose there are things to be careful of, and it may eventually corrode the fibers of clothing, but very sure it works.
However, given the composition of some modern fabrics (polyesters, for example), check with your local dry cleaner BEFORE attempting to use lye in a washer. Might want to check with the washer manufacturer, too, to learn the correct amount to use per load.
Caustic soda is sodium hydroxide (NaOH), aka lye.
I wouldn’t add it to a clothes washer, and maybe not to a dishwasher. The reason it prevents film on glass in a dishwasher is because in hot water it attacks the silica and changes it to sodium silicate, which is water soluble. In other words, it actually dissolves a little of the glass each time by reacting with it. (It prevents film from building up on a substrate by removing the top layer of the substrate). The dissolution won’t occur perfectly evenly over time, so if used too aggressively the glass eventually will gain a slightly rough texture and after a long enough time it will have a slightly frosted appearance that is permanent. Sodium hydroxide does this even to the high grade borosilicate glass used in chemistry laboratories.
As for the clothes, sodium hydroxide will also break most natural fibers down over time via alkaline hydrolysis. If you’ve ever had a cotton shirt develop a hole in it over time from bleaching, the weakening of the fibers that leads to the holes isn’t caused by the sodium hypochlorite (which releases chlorine) in the bleach so much as from the sodium hydroxide added to bleach to stabilize the hypochlorite.
So yes, caustic soda is good for keeping glass looking good in the short term, and excellent for getting grease and oil out of clothes, but it damages both in the long term. It matters less with the glass because it removes very, very little each cycle, but it’ll damage natural fabrics pretty reliably in the long term.
Caustic soda = sodium hydroxide = drain cleaner
Caustic soda, chemical name: Sodium hydroxide - NaOH
It raises the alkalinity of the wash so that it does a better job of cutting grease.
Phosphates work better though, because the phosphate ion does a better job of complexing minerals which deposit on the items being cleaned.