> Web assembly trashes that idea of transparency
Only if you believe minified JS is significantly easier to audit, which seems rather unlikely.
In both cases, the thing which works is securing the capability rather than the code. Having generic USB support is risky but e.g. having mediated access to cameras and microphones has been fine.