These verbs both mean to put someone or something in the place of another. To replace is to be or to furnish an equivalent or substitute, especially for one that has been lost, depleted, worn out, or discharged:
To replace:
to provide a substitute for (something broken or unsatisfactory, for example) - AHDEL
To substitute:
To put or use (a person or thing) in place of another - AHDEL
While the two are synonyms, replace does carry a stronger connotation of being long-term.
The etymology of substitute, particularly the prefix "sub" may suggest why it has a weaker connotation of being permanent:
Origin
late Middle English (denoting a deputy or delegate):
from Latin substitutus 'put in place of',
past participle of substituere,
sub 'under + statuere 'set up'.
Substitute is rendered from it's Latin origin: "set up under"
PREFIX
1 At, to, or from a lower level or position:
subalpine
1.1 Lower in rank:
subaltern
subdeacon
Although permanent replacement is CURRENTLY an acceptable use of substitute, it's original use was closer to "deputy". A substitute would stand in for the principle as a duputy:
- a deputy "replaces" the sheriff who ordered him to execute the warrant
- the corporate vice-president "replaces" the president who is out of town
- margarine "replaces" butter when it is not available
- a temp "replaces" the secretary while she is on vacation
Each of those "replacements" is temporary because the principal remains available "above" her substitute.
Edited to add: As @John Lawler points out, they are the same but serve opposite rhetorical functions: he replaced 'old' with 'new'; he substituted 'new' for 'old'.
Both versions seem alright to me. In the English Corpus (many English books over the years) the phrase that ever happened seems to be used much more than to ever happen.
Consider this ngram comparing the two.
This ngram considers "(*) that ever happened" in which (*) is replaced by other words (the ones which occur the most). It shows thing that ever happened and things that ever happened are more common than to ever happen.
Best Answer
Occurs invokes the concept of a definite start or beginning. It sounds better to you because it usually gets at a more precise meaning of the concept that you want to communicate (based on your examples).
"The sound always occurs at midnight."
Happens is very similar but does not invoke the concept of the events start or beginning.
"Stuff happens."
It is subtle, but happens would be more vague in the way that you used it.
Here is a quote that supports this: