ATF does not possess any cleaning properties for an engine. It is of inferior quality compared to normal oil.
It gained recognition as a cleaning agent during the 1940s, a time when whale oil was still in use. Whale oil has a significant amount of esters, which have the ability to dissolve deposits.
ATF produced after the prohibition of whale oil (about 1975) lacks esters, which renders it ineffective for cleaning purposes. Indeed, transmissions remain free from contamination due to the absence of combustion byproducts, rather than the superiority of the fluid. The ATF is essentially a lubricating oil plus additives, specifically formulated to have a viscosity grade of 5W. I really want for this myth to cease to exist.
Returning to the original topic - if there is sludge present in your engine, it is advisable to clean it gradually. Introducing a significant amount of solvent, such as diesel fuel or other substances, into your engine poses the danger of dislodging substantial deposits of sludge, which may result in engine damage and blockage of the filter with such sludge.
It is advisable to clean at a leisurely pace. Consider using a product such as Liquimoly engine flush. Prior to a transition, you introduce it, let the engine to run without load, and thereafter replace the oil. It is specifically engineered to disintegrate solid deposits, and the resulting dissolved substance in your filter will be replaced after you complete the flushing process and replace your oil. Under no circumstances should you drive with the flush in your engine. Adhere to the instructions provided on the can.
If you need to really cleanse your engine, there are specific oils available that use alkylated naphthalenes and poly alpha olefins. These are contemporary and costly base oils that surpass even synthetic oils in terms of their cleaning efficacy, outperforming even whale oil.
Valvoline just introduced a new product called Restore & Protect to the market. This product is part of Valvoline's global line of offerings.
The oil firm owned by my buddy produces a product with similar functionality, and their engine cleaner is effective, however at a gradual pace, which aligns well with your requirements.