The 'Mr Hanky taking Ambien & tweeting offensively' storyline is based on Roseanne Barr posting an offensive tweet that she later blamed on effects of the sleep aid on her in 2018.
The episode's title 'The Problem with a Poo' is a pun that references the 2017 documentary 'The Problem with Apu' which addresses the perceived negative stereotyping of the Simpsons character Apu Nahasapeemapetilon.
The episode also parodies the confirmation hearings of Supreme Court Justice Brett Kavanaugh.