@Dimitri *******
did you have a history of staying in Thailand prior to those 5 months? Were they back to back?
History matters as well. She's only been in twice, it doesn't state the day she left, so seeing they weren't border runs, it's probable/possible it's not the day her visa expired. Returning home for 1+ month each time is seen as a positive. I'd be willing to bet the absolute worst that would happen to her would be the officer telling her to get a long term visa next time.