I think it is likely the error is not on the Bitcoin side it is rather on the mempool. To be sure, try to add the debug configurations on my post above, I believe it will give clarity why the mempool is returning HTTP 500 since it will log more output on both electrs and mempool.
Looks like it's the connection between mempool and electrs as you suspected.
When I use the rpc values in bitcoin.conf as per the original guide I get the occasional error when running mempool, but I can see it syncing
Dec 13 14:43:40 [75581] DEBUG: Fetched transaction 1 / 6
Dec 13 14:43:40 [75581] DEBUG: Fetched transaction 2 / 6
Dec 13 14:43:40 [75581] DEBUG: Fetched transaction 3 / 6
Dec 13 14:43:40 [75581] DEBUG: Fetched transaction 4 / 6
Dec 13 14:43:40 [75581] DEBUG: Fetched transaction 5 / 6
Dec 13 14:43:40 [75581] DEBUG: Fetched transaction 6 / 6
Dec 13 14:43:40 [75581] DEBUG: Mempool blocks calculated in 0.001 seconds
Dec 13 14:43:40 [75581] DEBUG: New mempool size: 470 Change: 6
Dec 13 14:43:40 [75581] DEBUG: Mempool updated in 0.01 seconds
Dec 13 14:43:41 [75581] DEBUG: Electrum attempting reconnect...
Dec 13 14:43:41 [75581] ERR: Electrum error: {"errno":-61,"code":"ECONNREFUSED","syscall":"connect","address":"192.168.4.116","port":50001}
Dec 13 14:43:41 [75581] ERR: Electrum error: {"errno":-61,"code":"ECONNREFUSED","syscall":"connect","address":"192.168.4.116","port":50001}
Dec 13 14:43:41 [75581] INFO: Disconnected from Electrum Server at 192.168.4.116:50001
I tried your suggestion in another thread on here by setting the bind/allowip values
rpcbind:127.0.0.1
rpcbind:192.168.4.116
rpcallowip:192.168.4.122
rpcport:8332
But that causes mempool to fail immediately on restart (it never connects)
Dec 13 14:45:53 [75763] DEBUG: updateMempoolInfo: connect ECONNREFUSED 192.168.4.116:8332
Dec 13 14:45:53 [75763] WARN: runMainLoop error: connect ECONNREFUSED 192.168.4.116:8332. Retrying in 10 sec.
Dec 13 14:45:53 [75763] DEBUG: {"errno":-61,"code":"ECONNREFUSED","syscall":"connect","address":"192.168.4.116","port":8332}