So it comes down to how good the Pokemon is that gets this move. A terrible Pokemon with one broken move still won't make much of a difference outside of some niche scenario.
since this is a move you need to plan where it would fit within learnsets, is a early learn move, or a late move. The biggest factor here is how many and what kind of pokemon have access to this move.
If a large variety of pokemon have the move, the "effect" will feel more pervasive and this really isn't the kind of thing you want to be too common.
[...]
So you need to heavily consider who gets this move.
It's a late move, but a lot of Pokemon can learn it. It's the TM given by the 8th gym leader - and every one of his Pokemon have it. It's only learnable by TM, so you won't see it before that point.* On a playthough, you would basically only have to deal with it in that one gym battle, but the player would then have access to it after that, and as a TM it would definitely affect competitive battling if it's strong.
As to specific combos, it being a TM doesn't preclude saying things like "don't give this to anything that learns Perish Song." It being learnable by bulky and/or hard-hitting Pokemon like Salamence would be harder to avoid, since there are a lot of those.
I think you shouldn't make it permanent firstly, there are few permanent effects in pokemon, I think you should do like you thought and instead set it to a timer like most others and have it last 5 turns.
The current iteration of it is a binding move, so yeah it would last for only 5 turns. Or rather, for 3-5 turns.
Damage: does the move itself do damage or is it just the binding affect? I think it could work fine just off the binding, but if you keep the damage at or below 70 and make sure concurrent use doesn't extend the timer, damage also shouldn't be a problem.
It deals damage, both on the initial hit and at the end of each turn. If the target is not switching out when it hits, it does basically the same thing as a regular binding move. However, I currently have it dealing double damage if the target is attempting to switch out, like Pursuit. The base power would be sub-par for a late game move, but obviously much more significant if doubled. Most binding moves have a base power of 35, which would double to 70.
and make sure concurrent use doesn't extend the timer
By this I assume you mean that the move fails if its effect is already active? Is that the way it normally works for binding moves? Bulbapedia doesn't appear to say.
I'm not 100% sure but I believe switch moves would still work under things like mean look or bind. So things like baton pass, u-turn, volt-switch etc.
Bulbapedia lists "can't escape" as one of the effects that is passed by Baton Pass, but doesn't specify whether this applies to binding moves or only to moves like Mean Look. For Volt Switch, it calls out the various moves and abilities that can prevent a Pokemon from escaping, saying that Volt Swith still works under these effects, but doesn't mention binding moves. I can understand Baton Pass not transferring the trapping effect of a binding move, but without it being specified I'm not sure what to assume in terms of whether binding moves would prevent Baton Pass or Volt Switch from being used at all.
It sounds as though Dawn and Megan think that this would be too powerful given that it's a TM. By Meister_anon's analysis it might be okay if it dealt little enough damage; but I worry that reducing its damage by much would make it not work well in the gym battle it's featured it, which would defeat the whole point of the move as well as ruining the gym battle. As to other ways to make it not so broken, I have at least one alternative idea, but it has a problem - or at least I think it does.
Thinking purely in terms of game mechanics and disregarding flavor, an earlier iteration of this idea had it only trapping the target if it did in fact hit a target that was attempting to switch out; under regular circumstances it would just do damage, and not that much damage for that point in the game (base power 60 or less, and again this is the 8th gym). This would probably solve most of the issues listed; however taking into account how elegant and intuitive the move feels, I kind of feel like it really wants to be a binding move - especially if it only traps the target for a limited time, instead of lasting until the user switches out. The move being able to hit Pokemon that are switching out while also negating the switch is the move's primary function; but flavorwise it feels inelegant and unintuitive NOT to make it a binding move, and binding moves trap the target when just used normally.
Let me walk you through the chain of reasoning that led to me creating this move as it currently is.
I was creating a Dark-type gym leader, and trying to figure out what TM he would give out. Given the lack of precedent for Dark-type gym leaders, I had nothing to go off of. (Note: I haven't played Sword and Shield yet and am trying to avoid spoilers about it. If Sword and Shield has a Dark-type gym leader, DO NOT TELL ME PLEASE.) Few if any of the Dark-type moves that I currently had his Pokemon using were TMs (he uses a lot of dual-type Pokemon so a lot of his moves aren't Dark-type), and none of them felt iconic to him. I'm not aware of a list anywhere of all of the moves that have ever been TMs, but I looked at the moves that some Dark type Pokemon can learn by TM, and still nothing felt right.
It then occurred to me that if Pursuit were a TM, that would work, since his gym battle uses a strategy and theme that would likely give the player reason to want to switch on multiple occasions. (This is not to say that I think that punishing or preventing the player switching is necessary to making his strategy work. It's not - I just felt it would be an appropriate move for him to have and to give as a TM, and a good way to further spice up the battle.) There was a problem, however - this was the 8th gym, and Pursuit isn't a very strong move. It's a 40 base power attack that deals double damage if the target is switching out, but at this point in the game you would have access to moves that just straight up have 80 power or more. Getting to hit the original target if it switches out instead of hitting the Pokemon that replaces it can be useful, but it doesn't seem THAT relevant, certainly not worth the move having only 40 power normally this late in the game. So I decided to create a new move that was like Pursuit but which also
negated the switch out if it hit a Pokemon that was switching, and then proceeded to trap it for as long as the user remained in battle. I also upped its base power a bit, to 50 or 60.
This, I felt, would create a really interesting gameplay dynamic, because - in the event that a situation were established where the player would want to switch, which the AI could recognize - the player and the AI would be trying to second-guess eachother as to when the player would attempt to switch and when the AI would decide to use the move. The move itself, however, felt inelegant to me; upgrading Pursuit's damage-doubling effect to also negate the switch out felt fine, but the aspect of "and it also traps the target for as long as the user remains in battle," while I felt like it would lead to good gameplay, felt awkwardly "tacked on."
I then later had the idea to make the move a binding move - dealing recurring damage and trapping the target for 3-5 turns - which I felt solved this intuitiveness problem very well. I was very pleased with this - until I realized that this would make the aforementioned second-guessing dynamic moot, since such a move would ALSO trap the target when just used normally. Meaning that - again in the event that the AI recognizes that the player will want to switch and be in a bad spot if they don't - the AI can just use the move straight away, trapping the player in this bad spot
no matter what they do. I then further realized that a TM move that says "if I decide to click this move, you're not switching out, even if you outspeed me this turn" would likely not go over well in PvP battling. It would probably be fine for the remainder of the playthrough since AI opponents don't tend to switch very much, but in PvP people switch all the time.
So in summary, having the trapping effect
only occur if the target attempts to switch out on the turn the move is used feels like it would lead to good gameplay, but it also feels very clunky to me; does anyone disagree? Whereas making the move a binding move feels like it makes much more sense, but would negate this good gameplay dynamic, as well as, I fear, being overpowered in general.
*(Almost. It's a Dark type move that I named "Dark Tendrils," and is flavored as tendrils of shadowy energy grasping the target. I then wrote down that the only Pokemon that learns it by level up is Umbreon, but that on Umbreon the name is changed to "Floor Tentacles." Kudos to anyone who gets that. 😜)