I suss your question boils up to 'what are the cognitive traits of a 'safe' melody.
I say 'safe' as there is always threat detection (fight or flight) involved with any stimulus.
https://en.wikipedia.org/wiki/Fight-or-flight_response
One key (pun intended) characteristic of creating a 'safer' melody is chunking.
https://en.wikipedia.org/wiki/Chunking_(psychology)
"In cognitive psychology, chunking is a process by which individual pieces of an information set are broken down and then grouped together."
Please note it doesn't say "words" ... or shapes, colors or numbers ... but information meaning it applies to ALL stimulus.
What this means in-effect is sometimes called 'call-answer' melody writing ... some musical notes effecting a threat response and others 'quelling' that response.
The groups of notes that sound like one 'musical sentence' are never terribly long ... as are the lyrics that may accompany it. (e.g. "There's a lady whose sure." "All that glitters is gold." "And she's buying a stairway to upstairs.")
Lots of the most popular melodies have simple chunks of three ... Kasmir for example. "Yes-ter-day" ... A Fool in the Rain ... 'Da Da Da (rising)...Da (pending shift)... Da Da Doh ... oh baby (answer ... falling, resolving, removing threat response whatever term you want to use).
What I am saying is that thebelieve cognitive biases commonly associated with speech perception also apply to melodies as they are literally 'pitch sentences'.
https://en.wikipedia.org/wiki/Cognitive_bias
https://www.verywellmind.com/what-is-a-cognitive-bias-2794963