I would add a trash cleanup (for inactive but registered devices), for example, every 6/12/24 hours (or add the ability to manually specify this interval). Alternatively, you could also tie this interval to DHCP, for example, deleting registered devices if their address lease has expired, they are offline, and they don't have a static address.