mommaroo: I'm not sure from what you wrote whether it was this particular agent's treatment of you that you found unacceptable, or the seeming arbitrariness of the "security" procedures themselves. For instance, I can't tell whether you object to having to remove your sandals and have your feet wanded (which I have had three times myself now since 9/11, once at the security line and twice at the gate) or the specific way they handled the situation.
The airline agents have rules to follow. If they don't they are at risk for losing their jobs. But there are ways to do it that are more professional than others.
If you do decide to write CO, you might want to make sure it didn't sound like a complaint about the security rules (which they will ignore), but more specifically about the agent's behavior.