I'll admit, before my trauma I had done sexual acts in public places (staircases, carparks, public restrooms etc) for the thrill of it and to me it was risky and exciting, a fantasy of mine.
But after my trauma, I tried to have sex way too soon and one of the times was in public. (The back of a building really late at night) And in that one instance, it was motivated by trauma. For me personally, I was verbally abused during my trauma (being called a slut and whore, loving attention bla bla) and I don't really know how to explain it but doing that in public was kinda like enforcing to myself that I was all those thing? I'm probably not really explaining it properly but it was kind of a way to punish myself for what had happened to me and tell myself that I deserved it.
I'm sure it would differ from each person's experience of trauma but I think you would really be able to tell if it was influenced by that. I think you could determine whether it's influenced by trauma if you really think about the pleasure you think you'd feel from exhibitionism.
I do believe it's a pretty common fantasy though cause of the risk factor and the adrenaline rush you get. I also know quite a few people who've done it too