Overheating?

Hello dear ones! Last night with my Kawasaki ZR-7s in the traffic jam. At some point the engine revolving became shaky, and then it went out again and again. I am worried that I could have overheated it. 1. Is there a safety shut-down automatic? 2 Is an overheating damage detectable? 3. How do I even behave in such a traffic jam situation, where an engine can overheat? After a 2-hour break she drove again completely normal. Thanks for your help