There are a couple things of note:
a) The uncompressed files should not be served (they are only there for development purposes), but the files should be gzip-compressed and those served instead. The only exceptions to this are the .data file, which can be left uncompressed since UE4 already compresses that (you can try gzip compressing it, and verify that the size will not reduce anymore), and the main .html file. The gzip-compressed files are about 20%-30% of the size of the uncompressed ones.
b) As result of above, when you have both .js and .jsgz file with the same name, the .js file is not needed, and only .jsgz should be served. You may need to flip a bool switch in the .html file that says something like “serveCompressedAssets = false/true;” to make the .html file request the .jsgz files. The *gz files need to be served on the web server with the HTTP response header “Content-Encoding: gzip”.
c) There should already be a .asm.jsgz file in the output directory, but for some reason it is not shown in your listing. For any missing *gz file, manually compress them to gzip. (This should happen automatically by UE4)
d) The presence of foo.asm.js file means you have deployed to older asm.js spec. The newer WebAssembly spec replaces this with a .wasm file, and greatly reduces the size. Make sure to have latest UE 4.17 and tick the checkbox in Project Packaging Settings to enable targeting deploying wasm. The .wasm file should be compressed as well, and served as .wasmgz.
For reference, with the above savings, the main UE4 engine file of the UE4 “Zen Garden” WebAssembly demo at http://mzl.la/webassemblydemo is 9,660,956 bytes in “wasmgz”. This is down from the 137MB of .asm.js shown in your listing.