I was wary when I first saw the plant in my garden, but research suggested it was safe. White flowers not purple, berries hanging in bunches not on their own, fully ripe berries (dull black, no green, not shiny). So I cautiously tried eating some. That was autumn 2022, when I first came to the house. I hadn't seen the plant in m garden since,so it's possible that what is growing now is from purchased Wonderberry seed, an American variety. But it looks identical to Solanum nigrum.
I think as long as the berries are completely ripe they should be safe, and cooking would make them even safer. I still wouldn't eat a huge amount at once, as I do get a slight mouth burn from the raw berries. More like a chili burn than a toxic thing. I saw mentioned on other sites that some people find the berries too spicy. I'm collecting them and storing them in the freezer till I have enough to make a sauce or jam from them.