It's a bit unclear to me what's happening. I have tested on two children now, and I seem to discern some pattern, but it's somewhat unclear.
With the first child, I spend time with it. Firs two times new traits. Third time an upgrade. Then two times no effect, so I stopped for a few years. Then, when trying at a later age, I could upgrade twice again, after which it stopped functioning again.
The second child, I could gain new traits five times. Then, no effect. After waiting for a year or three, I could gain an upgrade. Four times no effect. Then another upgrade. Then no effect.
What determines when spending time with children does anything, and what determines what it does? (New thread/upgrade existing thread)? It's seems rather random now.