Don't know much about the other stuff going on, but I do know a lot about beheavement and grief sadly, so I'll just focus on that.
We had a very close family member die when DS was 4. It devastated both of us and DS really fell apart. I read a lot about the psychology of grief at his age, and it's very different from the grieving process of older children and of course very different from adults.
Each age has its own individual difficulties when it comes to coping with death. The problem is that 4 yr olds are caught in between two stages of development that occur in younger and older children.
At this age they are not young enough to not understand the permanency and cause / effect of loss, and they're not old enough to understand death either.
So they really struggle to process it.
And because they cannot process it, it doesn't fade over time in the same way it does for grown ups.
Each time your DD moves into a new stage of development, and understands the world and herself differently, she will be re-processing the death of her baby sibling and the events around that.
Children also often don't understand why things happen, and the connections between events, especially when they are younger and are still grappling with the idea that the world doesn't revolve around them (!). But this is really sad when a tragedy happens, as they can blame themselves, or think they can influence events by doing something, or not doing something, by being naughty, or getting found out, or basically anything.
So, what I'm trying to say is, please take into account that she may well be grieving and terribly sad about the death of her sibling, even years later. Don't dismiss it as a factor in her current behavior just because it happened a couple of years ago. The new pregnancy will be triggering all sorts of feelings, and she might be feeling a terrible burden of thinking her behavior will influence events this time. Or that someone else can.
My DS is almost 7 and although he seems mostly fine now, every so often something will happen that completely throws him and raises those big raw emotions again.