Unfortunately I don't have any really good advice other than to provide you with some basic knowledge about how most Disney rides operate.
I have a friend who really can't handle being "trapped" anywhere, and while I don't know if she is truly cleithrophobic, she and I were stuck in a very difficult corn maze once and she completely shut down. Here is what I learned/did that helped:
At any moment, we could have just walked straight through the corn stalks and gotten out. It would have hurt, probably would have gotten in trouble, but the consequence would always be weighed against her health and well being. Knowing that there was an out, if she truly needed it, really lowered her anxiety to manageable levels. We didn't end up needing to dart through the corn stalks, but just knowing she wasn't actually trapped completely made it easier to manage the distress for her.
For Disney Land, I am imagining the situation of being "stranded" on IncrediCoaster or Pirates or Matterhorn with her. The first thing I'd do is frame it this way:
You are getting to experience a "version" of the ride that few people get to experience, it lasts for an undetermined amount of time and it is only as boring as you make it - inspecting all the different elements of the area of the ride you are in - closing your eyes and making out all the small audio details. Peering around different angles to see if you can see any "backstage magic".
There is a lot to do when the ride stalls out and stays that way for more than a minute - you just have to think of it like a bonus attraction within the attraction. There is ZERO chance you will be left there for long (though, if you don't make an event of it a stall can feel like an eternity). I haven't heard of anything much longer than 8 minutes before they come around and get everyone out.... and that is when you get one of the most interesting experiences - walking THROUGH an attraction with the lights on - the way Disney Imagineers and staff see the ride! Just getting to experience that juxtaposition actually sometimes makes me wish a ride would "break down" while I am in it, if only so I can selfishly view some of the more intricate details up close and personal.
For rides where it is harder to get out (Space Mountain, Pirates of the Caribbean, Matterhorn, etc...) I like that cast members come to escort you out. So if they have to "evacuate" it is a very personalized affair, which sounds so fun and interesting.
Ride breakdowns should be seen as an inevitability. The thousands of redundancies and emergency systems that are in place can round an error frequently, and those errors will typically cause a brief stall while the Cast Member who monitors the ride system evaluates that error for any concerns and returns the ride to functionality. Rides with access for wheel chairs or times when riders will need assistance may cause a continuously running ride to stop or slow briefly, and that can be unnerving but knowing
why (or at least the most frequent reasons why) can make it seem more normal and less emergent.
None of this really helps with irrational fears. But if you are someone who can be calmed and helped to a manageable anxiety level by logic... this might help.
Edited because you said
Disneyland, and I was in "Disney World" mode.