Honestly, you should consider reporting this to the FAA as the agent knew that there was a device in the bag that was unable to be checked, still insisted you give the bag over to be checked, and threatened with retaliation (denying you boarding) when you attempted to remove the offending item from the bag. Going through AA customer service means a very large chance that the most that happens is they throw some compensation you're away without directly addressing the problem staffer.
AA places a lot of emphasis on D0 (their program to ensure departures go out on time) & while this is a very minor violation in the grand scheme of things, letting it go unchecked could result in the agent going a step further next time to ensure they don't get written up for a late flight.
Reporting hotline is here, keep the complaint concise and focused on the violation (& potentially that you self-reported to AA and they just sent an automated response).
https://www.faa.gov/about/office_org...s/faa_hotlines