There are 3rd-party bootable tools that allow you to edit the account definitions. I’ve used one successfully up through WIndows 7; I forget the name, and the thumb drive is only labelled “password reset”.
But how “old” can a computer running Windows 10 be? Can’t you just do a clean install of the OS? This solves the lost-password and the cleanup issues at the same time.