So excluding things manually from Setup.bat sort of works, but with warnings. I suspect Epic does not test this way and just includes everything.
./setup.bat --exclude=Mac --exclude=iOS --exclude=Linux --exclude=Android --exclude=HoloLens --exclude=TVOS --exclude=Win32
That reduces binary footprint after Setup.bat from 47 to 22 GB, but the build now has new warnings coming from AutomationUtils, which seems to have its own idea of what platforms to build for:
55>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets(2106,5): warning MSB3245: Could not resolve this reference. Could not locate the assembly “BouncyCastle.Crypto”. Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
55> IOS.Automation -> E:\dev\Unreal_4_24_1\UESetupPartial\Engine\Binaries\DotNET\AutomationScripts\IOS\IOS.Automation.dll