My name is***** have been a veterinarian for 11 years. I am very sorry to hear that Emma has been having some strange behaviors. I understand how scary that can be when they can't tell you what is going on.
There are a couple of things that come to mind when I hear scenarios like you have described.
1. That she has enlarged anal glands. The anal glands are located on the the lower aspect around the anus (if you imagine a clock, they would be located at the 4-5 and 7-8 positions). When these get enlarged, it can be very upsetting for dogs. The treatment is expressing the glands.
2. If there has been any changes in the weather recently that correspond with the dates that she had the episodes, sometimes, even when they have never had issues with it in the past, something happens and they are suddenly scared when a storm or even just a breeze comes up. I do not know where you live, so I don't know if this applies, but something to keep in mind.
3. That there is something that has scared her in the yard, such as another animal, that is making her nervous.
4. If she has any undiagnosed medical conditions, they can also present as anxiety, panting, and shaking.
It may help to record an episode if it happens again, taking into account everything that is going on - weather, time of day, noises outside, etc.
Please let me know if any of these things make sense to you or not. If you have additional questions, please let me know an I would be happy to address them.
If I have answered your question to your satisfaction, please take a moment to rate me so that I may continue to provide and improve my services.