Hm
you are right not all devices have the same "physical" size when they have the same resolution.
The problem is that tablet's wich are larger than an smartphone (physical size)but have the same resolution... the tablet owner does have an advantage because you can better aim on it... hm
We don't have access to the physical size of an device ...you can't even read it from the OS... and i don't know a Data base with all devices.
BUT maybe you can measure the devices size via input...
you could ask the user to put two fingers on the device and calc the distance from the multitouch events.
Then you can either assume that the normal distance is ~1 cm and calculate the device size... ( I have to go)