I would choose the 4040 one, even if the 4300 has a bigger screen both have the same resolution, that probably makes the 4040 have a better image quality because the 4300 images should suffer a bit of image distortion(mostly imperceptible, but still). The 4040 one also works on more GSM frequencies and has a newer version of ice cream sandwich, even if its just a 4.0.3 instead of 4.0 it's still a improved version.
As you stated, they are almost identical, so, if the prices are almost the same I'd choose the 4040 but before buying you should check if the price difference worth paying a bit more for almost the same thing.