We had the opposite problem.
When difficult child 3 was very little, about 2 years old, he was amazingly adept on the computer. He also loved it. SO to protect my text files, we had a screensaver with a very short interval before activation, plus every time I left the computer even for a second, I would put it into sleep mode. To get out of screensaver/sleep mode required a password.
We did this because even if I saved a file, difficult child 3 would sometimes get onto the computer, make changes, close the file and automatically hit the return key for the default "save changes" so that next time I opened up my file, I might find a fewq lines of gobbledegook.
We found the screensaver password option worked to prevent this - until difficult child 3 learned that if he crashed the computer then restarted, he could quit the screensaver on restart, and then he could access all the stuff he loved.
Little monster - he had very poor receptive langage at the time (and even worse expressive language) but we were able to make him understand - do that again, and no computer for a week.
He simply hadn't realised that the screensaver was there for a very good reason, to prevent him getting in without our permission. He had (in his egocentric way) simply thought that he was 'fixing' a problem.
But I'm sure that if I set the computer to shut down at a certain time each night, difficult child 3 would not cope with it too well. He still needs time and warnings to transition off the computer. Besides, he would re-program it himself, then re-set it when he finally shut it down. He's now matching husband for the title of best computer tech in the house.
However, it's a good thought. husband will want to instal this, not for difficult child 3, but for me - to make me stop talking to you lot late at night and come to bed!
Marg