So how do I know exactly what entry is for which device? How would somebody who is creating a front-end know what software list to show? Since I have to run the driver with
the interface is the key.
if you look at the -lx output, you will see that cartslot device as a interface attribute. in the list xml, part has an interface attribute as well.
when you load from software lists, MESS run through the list in search of a game with the correct name and the correct interface. if you have correct name but no <part> with the correct interface, the game is not loaded.
in principle you might load games from any list, but loading is successful only if the interface matches
a frontend author might let the user specify a list for each media/device of a system and then run through the chosen list showing in the interface only the entries of that list with the proper interface.
the frontend author I'm working with to support lists, though, will use a different approach (which I haven't fully understood, given it's strictly linked to the way the frontend parses xml) and I'm pretty curious to test it... more on this when there is some working sample to share

When a system has tapes and carts listed I would need to implement some kind of translation code.
And how are entries, that have multiple entries, supposed to be loaded? If it has a cart and a tape I can't really use "-cart" as parameter.
first, there is no answer yet, because only carts have an interface so far and because no system with multiple entries has lists so far.
second, you are right, I took the wrong example. cart + tape should be handled only relying on the interface attribute (even if since we support no tape + cart combo, things may change)
for sure you will always need to load
mess system -cart name -cass name
the point is where the "name" checksums are defined.
possibility one: we have separate lists for tape vs. cart and the system looks in the different lists for items with tape_intf vs. cart_intf
possibility two: a single lists, and for each game with a combo cart+tape we have two parts with two different interface attributes
in both cases, the name attribute of part is not used.
what you might need the name for, is for games with multiple floppies/tapes: e.g. you could use it to introduce a sort of hierarchy where "disk1" part goes in the first floppy drive, "disk2" goes in the second drive, etc., if the user does not specify differently.
but again, there is list support only for carts at the moment, so it's a bit early to say what we might want to use name for (let's say the attribute is there to allow for extensions in the future).