How to get the title of root li element

In a nutshell, assuming you are using a walker to construct your menu. E.g. when customizing the start_el() method, the $item should be an object – somewhat – like the $post object.

In reverse that means, you have access to post_parent property. With that information you can retrieve the title with get_the_title() easily.

After your edit I see you want the top level parent. So get_ancestors() could be helpful to you, to get the top parent. $item->ID can be used as $object_id and nav_menu_item as $object_type. get_ancestors() returns an array. Use array_reverse on it to have the top level ancestors ID at index 0.