HI, thanks for using healthcare magic
An infection would not necessarily occur due to trauma only if bacteria is introduced into any wound present.
The swelling and discomfort due to the trauma would cause him to pull at the ear.
It should resolve on its own but if you or his parents are concerned then you can consider the use of children's advil
. It is anti inflammatory and would speed up healing.
I hope this helps