If he is shaking his head then its not ear wax build up. It sounds to me like its a fungal infection in the ear. I would take kitty to the vet so theycan take a swab of the ear.

Infections in the ear of kitty's is quite serious. Bastet had one just recently.