When we went down in 2005 my DS was just about that age and while he did make the 40 inch mark, big brother made the 44 inch mark so will still had to kill sometime. He loved Buzz Light year, Tommorowland Transit Authority, POTC, HM, Tiki Room.
I do have to agree with the others that have said be prepared for inconsistancy especially if he is just at 40 inches. We did have a couple of times where it was very close to him not making it on some of the rides even though he had ridden them before luckily the CM made a judgement call and let him on because he was that close. Also be prepared to be measured multiple times in a line, we ran into this several times on Splash Mountain.
As for the shoe sole thickness, most theme parks/amusement parks allow for a certain thickness for the sole of the shoe. If you think about the ride manufacturer would be stupid to deterimine the hight restriction on the ride based of a person being barefooted, because obviously everyone who rides the ride is going to have some type of shoe on and the thickness of the sole/heel of that shoe is going to vary. So when they determined the hight restriction they did it with an allowance for a certain amount of hight provided by a shoe. I know that parks owned by Cedar Fair allow for 1 1/2 inches. Now the rides at the water parks obviously are going to be based on a person being barefoot, since the expectation would be that people at a waterpark are going to be barefooted.