I think it's better to directly acknowledge that you are feeling sad or that you want to talk about a miscarriage or stillbirth rather than obliquely referencing it by calling another child a 'rainbow' child.
For what it's worth, I do agree that this is a better way of doing it, but not everyone feels comfortable with that. I would like to see more people being open about pregnancy loss and I think people who do choose to go public about it should be supported, rather than criticised.
I have been quite open about my losses with close friends and some colleagues, but I haven't ever referred to it on my social media. Part of the reason for this is that I haven't yet managed to have a baby and I don't want to be pitied. If I post something on Facebook today about my recurrent miscarriages then maybe people I know who have been through same thing would send me a message and let me know that they understand, and give me some hope or advice. But I also feel that the possible benefits of being open about it at this stage are outweighed by the risk that we might still be a very long way away from having a baby, and in a worst case scenario might never have one. It might sound stupid, but I would rather be thought of by my wider circle of acquaintances as someone who doesn't have kids because she's too busy getting ahead in her career, or enjoying being married and going on nice holidays (when we're not all on lockdown). I don't want to announce to the world that we've been trying for a baby for a year and I've had four miscarriages, and then go for another year or two or three without announcing any good news. I don't want people knowing that every three months or so I have arms like a junkie's because of all the blood tests I've been having to check whether my HCG is rising, and then to track it back down to zero after yet another miscarriage. I don't want people knowing about all the doctor's appointments I've had with different specialists in the hope that one of them will be able to figure out what's wrong with me. I don't want people speculating about how many more miscarriages I've had since I first posted about it, or whether we're doing IVF, or whether we've given up. I also don't want my brother and sister in law, who conceived a perfect baby on their honeymoon last year and welcomed him into the world on what should have been the due date from my second pregnancy, to feel bad about the fact that a month beforehand I had to go to hospital to have the remains of my third pregnancy scraped out of my uterus.
So I'm not brave enough to share anything more widely just yet. Not until I have a healthy baby in my arms, and then, yes, I would like to find an appropriate way of letting people know that it wasn't easy for us. I want any woman scrolling through her Facebook news feed who sees my baby announcement and thinks "oh god, not another one" as she's still bleeding from her loss to know that we went through what she's going through and we got there in the end.
I probably won't do it by referring to my baby as my rainbow (although I might do if I can't think of any other way of doing it that feels right) but I completely get why someone might want to publicly acknowledge their loss in this way, and I think they should be encouraged to do it.