My “cussing” up stairs shower drain problem was that the house builders in 1983 ran a HPDE black plastic pipe to the drain which was made for PVC.

“Mortite” cord caulking, a string like sealing material that does not harden, finally made a water tight seal after trying nearly everything else.

https://www.frostking.com/products/weatherstripping/mortite-caulking-cord