My daughter was 4 when her 6 year old brother died and yes she was actively involved with the funeral and burial.
My son had severe disabilities and died at home in bed overnight very suddenly. He was whisked away by the paramedics when we called and brought to a nearby hospital.
Being Jewish, we didn't have an open casket, but I had a private viewing for the family including my daughter. If I hadn't she never would have seen him again. I believe that this was the best way to handle it. Her brother was an active part of her life and she deserved to see him again and be at the funeral to get whatever experience she could from it. She deserved the opportunity to say good by to him.
Death is a huge part of life and people only live as long as they can.
Although your niece never knew her sister in the flesh, she felt her sister in her heart and she too deserves to say good by to the baby.
As a side note, my cousin didn't tell her 4 and 6 year old children that Leon had died. The next time we had a family gathering her kids asked if my son would be there and that's when she finally told them about his death. What an insult to my son's life! Protecting your kids from the reality of death in my opinion is wrong. It's like letting your kids play shooting games and not talking to them about the death that it is promoting.
I hope this helps!
E.