Most likely, the reboots that you are seeing are the result of updates being installed. Disable automatic updates and this can be avoided (you can do it yourself as maintenance from time to time instead).

Why don't you just do a proper cleanup on a regular basis? I have a script file that I run on a regular basis that deletes unnecessary files. I also use the Disk Cleanup Applet from time to time to cleanup up the system files (including anything left around from Windows upgrades).

Here's the contents of my script file:

@echo off

rem Clean up all User files (deletes everything from each user's temp and downloads

rem folders plus all of their recent files and jump lists).

pushd %HOMEDRIVE%\Users

for /d %%f in (*) do if exist "%%f\Downloads" call :DelCont "%%f\Downloads"

for /d %%f in (*) do if exist "%%f\AppData\Local\Temp" call :DelCont "%%f\AppData\Local\Temp"

for /d %%f in (*) do if exist "%%f\AppData\Roaming\Microsoft\Windows\Recent" call :DelCont "%%f\AppData\Roaming\Microsoft\Windows\Recent"

popd

rem Clean up Windows files (deletes everything is can from the system temp

rem folder plus any log files that have built up)

pushd %SYSTEMROOT%

call :DelCont "Temp"

for %%f in (*.log) do if not "%%f"=="WindowsUpdate.log" del "%%f"

popd

rem Clean out the recycle bins (actually deletes the recycle bins and everything

rem in them; Windows will automatically recreate them the first time you

rem Subroutine :DelCont, which explicitly deletes all files in, and all folder

rem trees below, a specific folder.

:DelCont

pushd %1

for /R %%g in (*) do del "%%g"

for /D %%g in (*) do rd /S /Q "%%g"

popd

exit /b

I am sure there are other files and folders that could be added to improve it even more - or deleted; some folks might not like their recent files or jump list contents deleted, for example. If you do make improvements, let me know about them...

Modified the script to save vital variables when they change to a config file on SD card.They do not change very often(may change at 10 min but usually more than an hour) so not disk intensive write plus the chances that a restart will occur while writing to disk it's very low.

Modified the script to load the config at startup.

Now it can restart whenever it wants, the script will continue from where it was!