In Sigmund Freud’s psychosexual theory of development, latency is the fourth stage and occurs from around 5 years old all the way to puberty. In this stage, a child’s sexual impulses are repressed. He thought that since the next stage of latency, or the phallic stage, a child will wrestle with the Oedipus or Electra complex. These are traumatic events where a child forces themself to repress all of their sexual impulses.
Freud had some weird theories.