Create software that takes a database of the dictionary, alphabet, and phrases. Randomly generate a database of random strings of letters/numbers/symbols of varying length. Randomly assign different strings to different words/letters/phrases.
Frequency analysis should already be hard because you're operating at a higher level than letters. But to make it more difficult, randomly assign multiple strings to the same word.
Throw in a good assortment of null strings for good measure. Certain strings would indicate that X number of strings following it are to be discarded, or various strings could indicate to disregard everything in between, thus adding gibberish to the mix.
Create multiple versions where the same strings are assigned to different words/letters/phrases across each version. Have strings that signal that the following strings are to be interpreted with a certain version. A single version could be used for a whole message, or it could be changed throughout the message.
For example, in one version,
f&1nl8(a#v4 could mean
In another version it could mean
use version 13.
f&1nl8(a#v4 v19g31dfs [...] f&1nl8(a#v4 would appear to repeat the same word.
Assume that the software is secure, and the only means of attack is direct cryptanalysis on intercepted messages.
How secure would this code be against cryptanalysis?