What if you're on some obscure lesser known mobile network and the EU country you're traveling to doesn't support that network? Vodafone (a non obscure network) however seems to be ubiquitous in the EU.
Doesn't matter. The networks using the same name are independent companies anyway, for example Vodafone UK and Vodafone IE have the same agreements, as your lesser known mobile network.
It may go even further - the brand name of the network you recognize may be not owned by the same company, as the rest for the networks with the same name. For example, O2 CZ and O2 SK are not owned by Telefonica (anymore), but the other O2 networks are.
No, it doesn't - your home provider ought to publish a list of providers with whom they have roaming agreements. For example, here's Three Ireland's page for Germany: https://apps.three.ie/roaming/phone/prepay/Germany
From the observation, yes, but I'm not sure whether it is just up to the device to choose a network with the same prefix (the ids are different), or whether there is some network intelligence.
When there's no network with the same prefix, the choice is usually random. It doesn't matter anyway, money-wise it is the same.
The SIM card has a preset of preferred roaming networks, which your home provider may or may not update. Replacing SIMs every now and then may actually help with your roaming experience.
The wikipedia page mentions the "Right to use other operators' networks in other Member States at regulated wholesale prices" so I assume all networks have to offer themselves up to roaming to any other EU network.