Kiosk & screentime lockouts?

I have an idea for an app that could be setup by adults and used by children.

I’d like a way for the device to be “locked down” so the device can’t get to home (or possibly not sleep) unless a code is entered to exit kiosk mode.

Similarly, I’d like options to disable access at certain times of day to prevent kids from staying up all night playing games (ask me how i know🤪)