Use optional menu fields in a template?

In case it’s helpful, I found the forum post that I originally referred to in my previous comment:

Note that <Format> has some additional importance I didn’t mention in my last post—it cleans up the contents of classes to remove quotes.

Also, here is the documentation for the Menu Loop, which I imagine you’ve already read a few times:
https://docs.loopsandlogic.com/docs/learning-guides/dynamic-tags/loop/menu/

The documentation doesn’t mention classes at all, so it could definitely benefit from being updated.