Potatoes and nightshade are far enough away genetically to make cross pollination pretty remote. That is not to say it cant happen but it is highly unlikely.
Regarding the night-shade looking plant, it is likely a member of physalis, aka ground cherry, gooseberry, or cape cod gooseberry. There are a number of different types and some, like the Chinese latern, are poisonous. I have a native physalis I have been growing for a few seasons that i collected locally. It is essentially a mini green tomatoe. You have to be very careful and only eat them when they are ripe. Once they drop, the husk should be brown and crispy. They will also keep for quite a while if left in the husk so it’s totally possible to let them sit for up to a week if you aren’t sure. As long as you aren’t allergic to solanine, the worst it will do is give you the craps.
I’m certain it is a type of nightshade.
The leaves have alot of similarity to potato and eggplant leaves.
The flowers look almost exactly like a tomato flower. Small, with white petals, and a yellow crown in the center. Also, they are arranged in the same form on a branching structure, just like cherry tomatoes would be.
I have no doubt it’s nightshade, of some form. Not all nightshade is poisonous.