“Extending” Wordpress to offer bootstrap 5, vertical, accordion menu that is parent/child aware to depth 2

Wordpress comes with wp_get_nav_menu_items function that suffers from two major limitations:

  1. It is limited to depth 1 in determining the parent/child relationship