While attempting to reinstall Windows 8 on a failing upgraded Windows 8.1, I ran into all sorts of trouble. Unfortunately, google searches landed me here and there and nothing worked and the steps were "do this stuff, then jump to this page and do that stuff in the last comment." Not very helpful. So, I'm hoping to make this thread as helpful as follows. A step-by-step process... at least how I was able to do it.

Errors encountered:
The drive where Windows is installed is locked. Unlock the drive and try again.
Unable to reset PC. A required drive partition is missing.

Searches utilized to try and resolve the problem:
How to reset windows 8 from swm files
How to install Windows 8 from .swm files
How to use DISM to install .swm files
after using dism to apply swm install, how to make drive bootable

Primary websites utilized to gather information:
How to make a recovery USB drive
Prepare drive partitions for installation
Use Dism with install.swm file (Particularly, the "/Apply-Image section)

Cautions and Warnings:
These steps *will* clear your hard drive.
Make sure to backup all user files before proceeding
If you can, make a backup image onto a USB stick (16GB USB flash drive or larger. USB3 for bonus speed.)
All is not lost if you can't do that, but still have access to the Recovery Image partition. These steps won't cover the process of getting the files off the recovery drive. Sorry, but I was able to make the restore images to a USB drive before I lost my Windows partition. The basic idea is to mount the Restore Image partition to a drive letter, then copy those files to the aforementioned USB drive.
It is highly useful if you have a second computer handy.

What these steps do not cover:
If you've lost all access to the recovery files (swm or wim). At this point, your only option is to contact your computer's manufacturer and order replacement disks or purchase Windows 10 and install that.
This also does not cover utilizing .wim files. I didn't have those with which to work.
This does not cover replacing the wsm files into the Recovery image partition or restoring the Windows RE tools or System partitions, unless those partitions are handled with the restoring of the swm files. But I don't think so.

Step-by-Step Process:
Prepping your tools:
Sorry... this step is going to remain incomplete as I've forgotten how I did this, other than to say I followed the directions using the Create Recovery Disk steps found elsewhere. Essentially, I opened the start menu and typed "Recovery" and it was one of the options and I followed the directions in the app.

After creating the recovery disk, you will want to copy those files to a second computer.

Create an ISO file of the files copied to the second computer.
Download and install CDBurnerXP https://cdburnerxp.se/en/download
Run the application and select Data disc
Select the Data Disc option
Attachment 66233
Navigate to the folder where you copied your files from the USB drive
Click image for larger version
Select the files and folders and drag them to the project area (where it states "Drag and drop files here...")
Click image for larger version
Click File --> Save compilation as ISO file
Click image for larger version
Give the ISO file a name (I called mine reset.iso)
Click image for larger version

On the second computer, download RUFUS app: https://rufus.akeo.ie/
With the 16GB (or larger) USB drive in, run the RUFUS app
Select the correct device
Select "GPT partition scheme for UEFI"
Select "FAT32 (Default)" <-- IMPORTANT!!!
Click on the little CD button next to the ISO Image button
Click image for larger version
Select your ISO file
Click image for larger version
Leave all other options as default (You can modify the volume label, if you want)
Or, otherwise, see the settings as shown in the first RUFUS image above.
Click the Start button.

Bonus step:
Before removing the USB drive, save the following commands to a file called "CreatePartitions.txt" Sizes are in MB, adjust as necessary. (Though, I didn't with a 500GB hard drive) (The Windows partition will fill up the left over space entire space)
rem == CreatePartitions-UEFI.txt ==
rem == These commands are used with DiskPart to create five
rem    partitions for a UEFI/GPT-based PC. Adjust the 
rem    partition sizes to fill the drive as necessary. ==
select disk 0
convert gpt
rem == 1. Windows RE tools partition ======================
create partition primary size=300
format quick fs=ntfs label="Windows RE tools"
assign letter="T"
set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
gpt attributes=0x8000000000000001
rem == 2. System partition ================================
create partition efi size=100
rem    ** NOTE: For Advanced Format 4Kn drives,
rem               change this value to size = 260 ** 
format quick fs=fat32 label="System"
assign letter="S"
rem == 3. Microsoft Reserved (MSR) partition ==============
create partition msr size=128
rem == 4. Windows partition ===============================
rem ==    a. Create the Windows partition =================
create partition primary 
rem ==    b. Create space for the recovery image ==========
shrink minimum=15000
rem       ** NOTE: Update this size to match the size
rem                of the recovery image           **
rem ==    c. Prepare the Windows partition ================
format quick fs=ntfs label="Windows"
assign letter="W"
rem === 5. Recovery image partition =======================
create partition primary
format quick fs=ntfs label="Recovery image"
assign letter="R"
set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"
gpt attributes=0x8000000000000001
list volume
Setup the BIOS:
I wish I could have screen shots for you, but you may find them doing web searches in other places.
Secure Boot Control = Disabled (Save and reboot the computer and re-enter BIOS)
Fast Boot = Disabled
Launch CSM =Enabled (This option was on my ASUS laptop)
You may not need to bother with the Fast Boot or Launch CSM options. But the Secure Boot Control must be disabled.

Preparing the hard drive:
WARNING: This step will destroy all data on your drive. Make sure you have your files backed up. Yes, it is necessary.
Insert the USB drive you copied the ISO onto (using RUFUS)
Start the computer and boot from the USB drive (UEFI mode, if possible)
If necessary, click on the correct language (If I understand correctly, we are in Windows PE mode)
Click on the Advanced Options button
Click on the Command Prompt button
NOTES: You are probably on the "x:" drive. Find the drive
If you did not have a chance to create the CreatePartitions.txt file, do the following:
Type "notepad CreatePartitions.txt"
Type the code as shown above into the file and save it.
Close notepad
Back in the command line, type the following command
DiskPart /s CreatePartitions.txt
If the "CreatePartitions.txt" file is located on your USB drive, make sure you have the drive and path entered correctly, such as
DiskPart /s F:\CreatePartitions.txt
At this point, a bunch of commands will be run and your hard drive will be clean and ready to have a new operating system installed on it.

Install the operating system using DISM and the .swm files.
Type the following command
Dism /apply-image /imagefile:F:\Sources\install.swm /swmfile:F:\Sources\install*.swm /index:1 /applydir:W:\
Where F: is the USB drive. Whatever the case for you, make sure your path is correctly pointing to the swm files.
Where W:\ is the Windows partition (Change as necessary)

Make the drive bootable
(Surprise, surprise, I messed this up and tried to reboot without this step. If you did the same, no worries, just get back to the command prompt.)
Type the following command
bcdboot W:\Windows /l en-US
Shutdown the computer and remove the USB drive
Boot the computer
Apply 200+ updates
Install Windows 8.1
Install 200+ updates
Then, if your system can handle it, install Windows 10. It really is better.

Install Comodo Internet Security, 7-zip, Firefox / Google Chrome, TheGIMP, qBitTorrent, LibreOffice (use the torrent link!), Notepad++, PDFXviewer, PDFill, Greenshot, EasyThumbs, Audacity, HandBrake, VirtualDub, MP3Tag, FileZilla, Skype, VirtualBox
or not.