My reading of the NEC (I am *not* an electrician) is that 8 gauge copper wire is fine for a 50a circuit on a 50a breaker as long as the wire and breaker and device (or receptacle) terminals that you are connecting it to are rated to 75c.
I should also note that NM (non-metallic) wire (Romex) is ONLY rated to 60c and so you do need 6 gauge copper wire if using NM per the chart below:
Ampacity Charts
I should also call out that I *think* using a 40 amp breaker with a NEMA receptacle 14-50 is allowed. The key is that your overcurrent protective device must NOT be a higher limit than the wire is capable of handling. So if you have NM cable of eight gauge copper then due to the 60c insulation rating for NM cable, the max size breaker you could protect that with is a 40a breaker.
I believe the relevant part of the NEC code to look at is:
210.21(B)(1)
"Single Receptacle on an Individual Branch Circuit
A single receptacle installed on an individual branch circuit shall have an ampere rating not less than that of the branch circuit."
Furthermore, if you *do* put more than one NEMA 14-50 on a single circuit then you can only use 40a or 50a rated receptacles and I think this is only allowed for "cooking appliances" that are "fastened in place" per 210.23(C).
So basically my reading of NEC is that for our car charging purposes, you should just have a single receptacle per circuit.
Personally, for vehicle charging, I think the most "standard" and "practical" solution is a NEMA 14-50 with 6 gauge copper wire on a 50 amp breaker. That is about as vanilla as you get - though clearly other things will work and can be code compliant.
I see no issue using a Gen 2 UMC on a NEMA 14-50 plug that is only backed with a 40 amp breaker (32 amps being the 20 percent derate of a 40a circuit and that is what a Gen 2 UMC can draw max). But yeah, I likely would never install a NEMA 14-50 that way since someone later may have a Gen 1 UMC or other EVSE that tries to draw a full 40 amps on that NEMA 14-50 which may work for some time until that breaker blows. Cars are considered "continuous load" and you have to oversize your conductors and breakers by a multiple of 1.25 to be code compliant. So that is where you get in trouble with just a 40a circuit... The Gen 1 UMC is capable of 40amps of actual draw and so it would have no way of knowing it is 100% maxing the circuit (and due to the way breakers are tested in "standard test conditions" there is a good chance you would blow that breaker regularly).
As to what your "breaker panel can handle" - I have not heard of any panels that can do a 40a breaker but not a 50a breaker. If you have sized the conductors such that they could handle 50a then I see no reason not to do a 50a breaker rather than a 40a breaker. Either way your UMC gen 2 is only going to draw 32 amps max and so that is the number you would use for your load calculations to determine if you have a large enough electrical service to allow an EVSE charging circuit in the first place... (so I don't think the breaker sizing is actually relevant to the load calcs discussion - the loads are what is important).