There is only one GF/ASOUE crossover where Stan is put in Count Olaf’s role that I can accept as in character.
Dipper and Mabel lose their parents and inherit an immense fortune, to be delivered when the twins come of age.
Stan hears about this and engineers a scheme to adopt these kids he’s never met and somehow get his hands on their inheritance. He doesn’t abuse them or make them do ridiculous chores, but he does make them work in the Mystery Shack and is gruff and grumpy to them just as in canon, so he generally makes a bad first impression.
However, during the first week or so that the twins are there, Stan realizes there’s no way in hell he’s ever going to be able to double-cross them. Even if he won’t admit it out loud, his gooey marshmallow of a heart has been completely won over by these poor precious children and he would do anything to protect them. (He’d actually been won over since day one, it just took him a week to admit it to himself.)
This might be the end of the story, and the Pines family might be able to live a happy life together from this point out, were it not for the fact that unlike Olaf’s henchpeople, Stan’s associates are not a collection of goofy characters blindly loyal to him. On the contrary, the hardened criminals that Stan had originally intended to help him steal the twin’s fortune would think nothing of rubbing him out and kidnapping the twins themselves if they had any inkling he’d gone soft.
So for the twins’ own safety, Stan has to arrange for them to be sent to another relative. He tells himself this is all for the best, he didn’t know the first thing about raising kids anyway and he’s not crying you’re crying.
A few days later one of Stan’s associates contacts him, saying he’s found those rich kids that narrowly escaped their grasp and wants to know what the new plan is. To protect the kids (not to mention save his own neck,) Stan has to pretend he’s still in on the plan to rob them of their fortune. He follows his associates to the home of the twins’ new caretaker under the pretense of leading them in some new scheme, all the while quietly sabotaging things to make sure they fail.
So Stan ends up going everywhere the kids go, protecting them from his associates while trying desperately to keep those same associates from figuring out he’s actually helping the twins. Between Dipper and Mabel’s resourcefulness and Stan’s careful sabotage, they escape the villains again and again.
One of two things happens from there: Either the kids realize he’s protecting them from the start and eventually have a Not What He Seems moment where they find out he originally wanted to steal their money, or they think he’s working with the criminals from the start and there’s a sort of reverse-Not What He Seems moment where they realize he’s been helping them.
(Where is Ford in all this? Ford is Lemony Snicket. That’s why he’s writing about everything in the past tense, from the perspective of someone who learned about everything after the fact, unable to intervene until he’s brought back from the portal. He is initially angry at Stan and resentful of him, and his narration paints Stan as a selfish jerk and a villain in the beginning. But over time, the more he learns about both Stan and his niblings, the more affection and love trickles into his storytelling.)