Amended instructions to get the size of an updated winre.wim down to fit on an existing 500mb partitions:
1) Remove unnecessary features / packages from your mounted WinRE.wim - I have gone through all the features in WinRE to see what can safely be removed, most items e.g. Audio, Narrator, WiFi, WDS can be removed but only take a small amount e.g. 1mb off the size. Others such as Rejuv break it completely.
But removing the below reduced the size by 31mb
DISM /Image:C:\mount /Disable-Feature /FeatureName:Microsoft-Windows-WinPE-Speech-TTS-Package
DISM /Image:C:\mount /Remove-Package /PackageName:WinPE-Speech-TTS-en-GB-Package~31bf3856ad364e35~amd64~~10.0.19041.1 /PackageName:WinPE-Speech-TTS-Package~31bf3856ad364e35~amd64~en-GB~10.0.19041.1 /PackageName:WinPE-Speech-TTS-Package~31bf3856ad364e35~amd64~~10.0.19041.2364
2) Remove old obsolete files from \windows\winsxs\ - determined after hours of painstakingly removing a folder or two at a time and then testing it would still boot into recovery environment and that the tools would work each time.
Delete all folders in mounted \windows\winsxs\ with accessed / modified dates older than the date you applied the updates using DISM /Add-Package - most of these are dated the date the ISO / WIM was originally created (07/12/19) and some dated a bit later. This leaves it containing 921 folders and 1 file which in my cases were dated 13/01/23 e.g. the date I applied the update.
These were all removed by taking ownership / adding permissions to the parent folders by running Explorer as TrustedInstaller with NSudo - couldn't delete them or change permissions without doing this first using NSudo.
---
Fresh winre.wim from Windows 10 ISO - size = 415Mb
After applying updates as per
@hsehestedt instructions
here - winre.wim size = 498Mb (was 756Mb before doing the DISM /Export-Image)
In my case I applied (windows10.0-kb5022282-x64_fdb2ea85e921869f0abe1750ac7cee34876a760c.msu -and- windows10.0-kb5021043-x64_efa19d2d431c5e782a59daaf2d04d026bb8c8e76)
After reducing as per my instructions above winre.wim size = 432Mb