Unscramble the letters by letter frequency analysis
JavaScript (V8), 185 bytes

c=&gt;(l={},[...c].map(i=&gt;l[i]=(l[i]|0)+1),e=Object.entries(l).sort((a,b)=&gt;b[1]-a[1]).map(i=&gt;i[0]).filter(i=&gt;parseInt(i,36)&gt;9),[...c].map(i=&gt;&quot;EARIOTNSLCUDPMHGBFYWKVXZJQ&quot;[e.indexOf(i)]||i))

Try it online!
Doesn't currently pass the second test case, but instead is based on OP's description of how the unscrambling works. The test case seems to be incorrect at the moment, as some groups of letters (like F or P) repeat letters.
Explanation:
c=&gt;(                            // Define arrow function with argument c
l={},                           // Create an empty object l
[...c].map(i=&gt;                  // For each character i in c...
  l[i]=(l[i]|0)+1),               // Increment l[i] (the number of times i appears)
e=Object.entries(l)             // Format l as an array [&quot;x&quot;, &lt;number of times &quot;x&quot; appears&gt;] in variable e
.sort((a,b)=&gt;b[1]-a[1])         // Sort e so most common characters are first
.map(i=&gt;i[0])                   // Get rid of number of times appeared
.filter(i=&gt;parseInt(i,36)&gt;9),   // Filter out non-letters using base 36 conversion :)
[...c].map(i=&gt;                  // For each character i in c...
  &quot;EARIOTNSLCUDPMHGBFYWKVXZJQ&quot;[   // Get the nth item from the frequency chart...
    e.indexOf(i)]                   // Where n is the index of i in e
    ||i))                         // Unless it isn't a letter, where i stays i