It was done too rapidly, especially due to her episode long regression, but it worked okay I suppose. She got that far by at least using Nebby to try and find the root of her phobia for the first time in her life, so there was SOME proactivity even if in convenient circumstances.
Like with the twerps so very often, plot armour was apparent, but that's so overwhelming a part of the anime I struggle to find Lillie significant in use of it, besides her lack of strength sometimes making her a damsel in distress. Compared to some other twerps she has had a palpable number of times she DIDN'T get a DEM and was forced to develop on her ability sometimes (namely being the smart girl of the team).
I think an issue may be that, if you take out her games background, Lillie's trials are actually kinda mundane, less about Pokemon or professions and more just general self esteem (stuff like her crossing the Poni Canyon bridge doesn't look impressive without the undertone she is a realistic sheltered little girl, not an action hero like the player character or Ash). I feel like the anime knew that and so added the phobia to compensate for dumbing down her family backstory.