It's great you are exploring cryptanalysis. But I think "Mathematica's potential" first of all starts from using functional programing:
There are many built in functions in docs to use instead of writing loops. For example your first frequency stats could be just this:
CharacterCounts["The quick brown fox jumps over the lazy dog.",IgnoreCase -> True]
Giving:
<|" "->8,"o"->4,"e"->3,"r"->2,"u"->2,"h"->2,"t"->2,"."->1,"g"->1,"d"->1,
"y"->1,"z"->1,"a"->1,"l"->1,"v"->1,"s"->1,"p"->1,"m"->1,"j"->1,"x"->1,
"f"->1,"n"->1,"w"->1,"b"->1,"k"->1,"c"->1,"i"->1,"q"->1|>
Pretty, cool, right?