Is it safe to include passwords in client-side WASM code?

No, the WASM codes can be decompiled. Use this WebAssembly to C decompiler.