You did not indicate what if you had done minimal hardware testing, .True, there's a very good possibility is software related. But it turns out to be hardware, you'll just be wasting a lot of time.
Here is a very, very simple hardware test. You prepare a couple of floppy disks. One of him is just a plain formatted floppy. The other a DOS floppy. Inside the BIIOS always boot from floppy. Of course, you know happens. If the system boot sector is present, it will put up into a DOS system. If the blank floppy is present you get an error message because there is no operating system.
Also, set the hardware so that if there's a power failure or power interruption, the machine ill restart and go back into power on state.
By now it should be pretty obvious to you what I'm asking you to do. Start up the system with a good system floppy and let it boot up. Then remove that and put in the other floppy drive that does not have the system. Now just walk away and let it sit there overnight and come back in the morning to be one of two things. You still have just DOS prompt, or now you'll have the error message
So what is the point all this? To make sure what happens is not system software failure. In all my years I have never known MS-DOS to just reboot itself for no reason. (Windows, yes.) The reboot occurs because of a hardware If your don't fix a hardware problem, there is little point digging into Windows. First of all you have to make sure it is not really a hardware problem.
Now if you are reading positively sure it is not a hardware failure, and just ignore everything I said.