If people are committing crimes anyway and this is the only way to gather enough evidence for a conviction I suppose it is o.k., However that being said those on these types of operations should not use entrapment methods as it can be a legal minefield and also morally wrong.
Short answer yes it’s o.k. , Longer answer beware of entering a world of lies & violence as it can easily taint ALL who enter it.
Peace.