Hell, it's not even any of the things the Internet has taken to calling "gaslighting," most which aren't gaslighting either. It's just reverse psychology.
Probably worth noting that castle designs at the time basically screamed "this is a trap". Castles were designed with a courtyard inside of the first gate. Then there was a second gate on the other side of the courtyard. Attackers would be funneled into the courtyard, where they would be surrounded by archers on the tall palace walls. Notice this palace has several courtyards arranged in series, with gatehouses between each one:
Sima Yi's fear was that if he had his army enter the gate, it would be closed behind them and they would be trapped in the courtyard. It wasn't just a sarcastic "Hey come on in" signal as a Hail Mary. It was a very clear "My hidden archers are going to chew you up as soon as the gate closes behind you" signal.
All warfare is deception. Yi then had the entire army enter the town pretending to be tourists. Then of course Liang and his men put on different disguises pretending to be tour guides. After a lengthy comedy of errors, everyone went home and told their wives that it was a brave and heroic battle. All warfare is deception.
This is more an example of reverse psychology, than it is of gaslighting. Also I hella wish you could do shit like this in a video game that wasn't just human vs human. There's no psychological warfare when your opponent has no psyche. 😮💨