Hello. For some reason, the hang does not happen (0% failure rate in bookworm) or it happens a lot less (10% failure rate in trixie) when building on single-CPU systems.
So, I'm going to try adding --max-parallel=1 to dh call to see if that improves things. If it does, I'll make a team upload with such minor change. (But help is still welcome to investigate the underlying problem, please contact me privately if you need a VM to reproduce). Thanks.