It's actually possible in a way:
https://en.m.wikipedia.org/wiki/SafetyNet
But you necessarily need to limit the devices and operating systems that are allowed. No custom ROMs, no root access, etc.
It's bullshit and breaks open computing as a concept.