Disclaimer I don’t know the ins and outs of HA nor have I used it.
I’m not sure if you have the automatic lock/unlock part figured out but that’s the part I can’t help with.
In terms of detecting when kid comes home, some ideas:
A low power esp32 board coded to connect to your home network, then if the device name or MAC address is discovered on the network, or have the device send a message every 10 seconds or when a button is pressed.
NFC card and reader in front of the door, can be “hard wired” rather than over wifi if you prefer. The card doesn’t run out of battery but access still can be assigned or revoked if lost.
A passcode: many hardware store doorlocks offer this, if the main problem is your kid losing keys. Then just do automation inside the house as you see fit from motion detectors or whatever your heart desires.
E: a few people ITT don’t like to have fun thinking of ideas how to use home automation, even if it’s unnecessary.
3DS with broken off top screen ❌️
1DS ❌️
Newly minted Gameboy Super Advance ✅️