How do I go about assigning unique ID to the generated <li> (maybe the menu name?).
There are a few ways to do this. If you want the menu title you can simply add this to the rowTpl (or other appropriate tpl chunk) like this:
<li id="[+menutitle+]">
<a href="[+wf.link+]" title="[+wf.title+]" [+wf.attributes+]>[+wf.linktext+]</a>
[+wf.wrapper+]
</li>
Then in the Wayfinder call add rowTpl=`nameOfTplChunk` to assign the code in the chunk to the specific template tpl.
In the same fashion you could use any Template or Document Variable.
You could also use the same the linktext output. Just set the &textOfLinks to menutitle
<li id="[+wf.linktext+]">
<a href="[+wf.link+]" title="[+wf.title+]">[+wf.linktext+]</a>
[+wf.wrapper+]
</li>