Op, well done for trying to take on board some of the advice here, I know it must be very hard to get over what a shit he's been to you. And fwiw your dd does sound like a 'young' 7 yo, so I understand where you're coming from.
As far as child safety is concerned, it's worth remembering that we can't expect our dc to behave in a way that is alien to them as they just won't be able to do it if they ever need to.
Social norms are that you're not rude to people, you speak when spoken to, under no circumstances must you hit, kick, pinch or bite and we teach our dc this from birth.
So, we haven't taught our ds to be scared of strangers, or not to talk to them. We've given him scenarios and asked him what he might do in certain situations. We've said that the vast majority of people are good and that most adults like children and like to pass the time of day with them and are not to be feared.
The absolute 'no go' line is that he, under no circumstances, goes anywhere, with anyone (either known or unknown), without asking us first so that we know exactly where he is, or we'll worry if we can't find him. He finds it easier to comprehend that he could say to someone, politely "let me ask my mum/ Dad first" rather than shout "No, go away!" (Who says this in RL?)
We've explained that if he's ever playing on the green nearby and a car pulls up and asks him to approach, he stays exactly where he is and says "I'll stay here, thank you." But he also knows it's unlikely that anyone with good intentions will stop a car and speak to a child, so he should make his way home, with a friend, to tell us.
He knows he never goes anywhere alone, only ever with someone else. He knows he can play in our cul de sac or on the green and that he goes no further. While he's socially very aware, he's not quite ready to cross busy roads (his judgement of speed and distance is not quite there), but that will be the next step.
He has a watch so he knows what "15 more minutes" is and he uses it when we go camping.
And most importantly, he knows that if he's ever grabbed by one of the very few bad people out there, it is perfectly ok for him to break the rules we've instilled in him - he can kick, punch, bite, pinch as hard as he possibly can, and he must also shout "I don't know you/ you're not my dad!" So that other good people nearby know he's not just misbehaving and will intervene.
We've also spoken openly about 'good' secrets (birthday parties) and 'bad secrets' (anything that makes him feel bad), inappropriate touching and that he should never, ever, be expected to keep a secret by any adult (including us). There is nothing he cannot/ should not tell us.
He's totally comfortable with all of this. He would not be happy to break society's norms and expectations around children's behaviour without our express permission or suggestions around how to deal, within his comfort zone, with different situations. We still give him scenarios to make sure he's not forgotten and have conversations about trust, who his trusted adults are and that knowing someone a little does not mean he can trust them in the way he would trust dh and I.
Small steps for your dd I think - too much freedom at once could expose her naivete and perhaps you could start a conversation with your ex along those lines. Agree together (if you can) some clear initial boundaries. And if you're not comfortable with something you're entitled to feel that way and voice those concerns constructively. Coparenting is indeed hard, and even when parents live together you have differences of opinion in how to deal with dc. It's very hard to let go when they're visiting the other parent and are out of sight.
Good luck op. 