You are correct- they do look almost identical on the outside. The differences are in the inside - specifically port /sleeve timing and locations. The Q40 422 guts won't be happy unless you are spinning a smaller prop in the low to mid 23k rpms. The Q500 428 guts will want to see around 19k rpms. There are specific props for each motor.
Kurt