The purpose of this title as it relates to children is to secure for each child the care and guidance, preferably in the child's own home, that will serve the moral, emotional, mental, and physical welfare of the child and the best interests of the community; to preserve and strengthen the child's family ties unless efforts to preserve and strengthen the ties are likely to result in physical or emotional damage to the child, removing the child from the custody of the parents only as a last resort when the child's welfare or safety or the protection of the public cannot be adequately safeguarded without removal; and, when the child is removed from the family, to secure for the child adequate custody and care and adequate planning for permanent placement of the child. It is the policy of the state to acknowledge and take into account the principles of early childhood and youth brain development and, whenever possible, consider the concepts of early adversity, toxic stress, childhood trauma, and the promotion of resilience through protective relationships, supports, self-regulation, and services.