I'm sorry to hear of your daughters death. And as she was full term you must have been planning and preparing and talking about it to your son.
He sounds very self aware, and is showing some signs of low self esteem. Is he having difficulties at school? Does he get along with his peers? I presume he has no diagnosis himself?
Even though he is only 5, and will not have a good understanding of death. I am sure his sisters death must have confused him. There must be books out there to help you discuss this subject with him. Sometimes it is helpful to use the animal world as examples and compare what happened in your family circle.
I have a child with autism, and we also have a smallholding, and there have been many times when I can explain human behaviour or events in terms of something the animals are doing or he has witnessed.
Dealing with animals it shows you that although most births are uneventful, there are always a portion of them that are unsuccessful, or have deformities, or die shortly after birth, or are rejected by their mothers etc. Sometimes we can intervene and do something to ensure their survival, sometimes there is nothing that can be done.
Unfortunately life is not perfect for most people. We all have things in our lives that are upsetting and traumatic whether it is the dealth of an unborn child, or illness or bereavement etc. That is part of life, and we need to learn how to discuss these painful issues and show our children how to cope with these situations.
Maybe you could plant a tree in your garden as a reminder to your daughter, or have some other kind of memorial. We expect so much from life, and we are never told about when things go wrong or how to prepare ourselves or cope with it. You sound like you have a strong family unit, and so you can bring up these sad issues and talk about them.
It maybe that his recent experiences are nothing to do with his sisters death, but it is still worth discussing with him so that you get a chance to go through the emotions of it together and he sees it is okay.