I don't know about genes but I tend to think we're all products of our history and the history of our parents and immediate family.
The way humans behave, think of the 20th century, the shadow was poverty, harsh working conditions, colonialism bringing slavery and mass emigration, the Victorian age and its morals, the 20th century brought 2 World Wars in which millions died and a massive economic crash in the 1930s. And that's just the big stuff!
Violence and abuse is always with us and always will be. Some are lucky and many aren't. Life being suffering as the Buddhists say, is true!
Doing my family history and studying history brought me some peace because, in all honesty, there were people who had miserable lives suffering poverty, pandemics, early death, dead children from illness and accident, forced adoption and separation.
I have an Irish friend who became pregnant at 16 and her mother just closed the front door in her face and said 'I never want to see or hear from you again'. Ireland is a good case study of colonial interference, poverty and appalling treatment of women.
There was a thread on resilience the other day, I think it depends on personality and what level of support and love the child had which bring the ability not to pass on what you suffered as a child. There's that Philip Larkin poem......
I was recently very struck by the thought that the religious statement 'rest in peace' might well have a much deeper meaning sorry, if that's a bleak thought.