While still pondering the matter, I suddenly realized that Words.anyItem() is a great way to select a random word in a text. Then I came up with this tiny script:

// Consider a story
// ---
var story = app.activeDocument.stories[0];
 
// Take a word in every paragraph of the story
// ---
var words = story.paragraphs.everyItem().
        words.anyItem().contents;
 
// Join the array
// ---
alert( words.join(' ') );
 

Stupid, isn't it?

Now suppose that our story has the following paragraphs:

    the all any every¶
    cat dog snake man¶
    is has eats¶
    a¶
    white red orange wild¶
    hat banana apple¶

The above script will then display a random sentence such as: “the snake has a red hat.” In fact, the story can lead to 4×4×3×1×4×3 = 576 distinct sentences! We are not far from Queneau’s A Hundred Thousand Billion Poems, are we?

Of course it is your business to fuel the pattern creatively. If you want InDesign to become a philosopher, get inspired by the Aphorism Generator by Joe Halliwell (after Paul Braffort) and try something like this:

Sample words to be used in random aphorisms.

…then launch the script with this slight modification:

var story = app.activeDocument.stories[0];
var words = story.paragraphs.everyItem().
        words.anyItem().contents;
 
alert( words.join(' ').replace(/[_ ]+/g,' ') + '.' );
 

Here is one of the truths InDesign taught me today:
“Doubting might be the silent modernity of courage.”