Solution. I think icon library cheatsheet is a decision. It allows to copy a character from the cheatsheet webpage to the text field in Illustrator and then copy its classname to the name of an object. So I will not miss my icon's classname, of course, if I don't forget to name it in Illustrator already after pasting.
It's helping but, in my opinion, the problem defined in my question still requires a solution.
As you see in a screenshot, Character Map has a field where the unique Unicode number for every single character can be found. I wish I could find and copy the CSS classname for every character as easily as I see it here. (Character Map even does not allow me to copy Unicode number, just see it.) Logically, there should be a feature to upload CSS stylesheet which icon library like Ionicons includes in its package.
As I mostly use Illustrator, the best for me would be to have symbols named by its classnames, so you would have a library and easily operate with your icons, changing, trying different ones and never miss their classnames. As a result, provide the classnames to your developer any time on demand.
I will try a script mentioned in the first answer (many thanks to its author), I'm not enough experienced in this so hope I'll do it right and it will work. Thanks a lot for your opinions, people, you are awesome, I learned something new!