Ya, 10 gage is generally 30A, 8 ga would work for 40.
I overcable these typically short runs a LOT and would probably use 6ga. Actually now that I wrote that I realized my panel disconnects/breakers feed the current AIO with 6ga and I think I limited at 40A max.
Yes, it never hurts to go up a size when you determine what you need (I do as well).
I have found this to be very accurate for calculating what you need: