As parents, it is our job to be aware of this dynamic and NOT share secrets with our children unless it is deeply considered first with all of the above in mind.
If there are painful family secrets that need to be shared at some point, it might be best done with the help of a therapist.
Let me know if you have felt the impact of having to keep a family secret.
Reference: Handler, S. H. (2018). 5 reasons why keeping family secrets could be harmful. Psychcentral.