For security reasons, this cannot be done completely automatically. But if you can live with a shortcut that takes you to Auto Lock when you get home, then there is an option.
1. Open the Shotcut app
2. Select Automation at the bottom, then Create Personal Automation
3. Select Arrive, select your Home Location, and tap Next
4. Select "Add action" From here, search for the "URL" action and then select it
5. In URL, type this address: prefs:root=DISPLAY&path=AUTOLOCK
6. Then, from the actions list, search for and add the “Open URLs” action
Done. When you get home, an automation will ask if you want to open Auto Lock, from there you can choose Never so that your iPhone doesn't lock. I know you were hoping for a better solution, but this is the closest I can get right now.
Alternatively. Then you can set Auto Lock to Never. Then use Low Power Mode as your "daily setting" - then your iPhone will lock after 30 seconds. Then you can create an automation that deactivates Low Power Mode when you get home, and in that way sets Auto Lock to Never.
The disadvantage of Low Power Mode is that, background app updates are disabled, as well as several things.
You can read more about Low Power Mode here:
Use Low Power Mode to save battery life on your iPhone or iPad - Apple Support