In theory it is more secure than Flash and "more open". Flash was bad because it was a security nightmare even "sandboxed" and the player was closed source. Nothing prevents either ActionScript or Java from compiling to web assembly though. Flash API are close to Web API so Flash could absolutely export to WASM. Now is Adobe interested in this is the question.