I'm still somewhat tickled by this thread

a) I am pretty sure that most BIRs do not add potato to their onion bhajis :

b) I am pretty sure that most BIRs do not grate their onions (or, indeed, their potatoes :

) I think they simply finely slice them.
c) In my opinion, the onion bhaji mixture (i.e. primarily onions, gram flour and minimal spices) should be AS THICK as possible (not thin!). I (as someone else suggested to do) simmply add the ingredients (with no additional water) and leave the mixture, for a while, to allow the gram flour to absorb the moisture from the other ingredients.
d) Avoiding "sponginess in the middle", is, IMHO, primarily due to a typical BIR "dual cooking process". Pre-cook them (say, at 160C, for a couple of minutes), allow to cool, then fry them again, prior to serving.