What harm will denying ocsp.apple.com do? After the recent issue of trustd trying to connect to Apple's overloaded servers, and causing slowdowns to Macs around the world, one discussion page suggested a temporary fix:

This command in Terminal will edit your /etc/hosts file to block
connections to the problematic Apple server:
echo 0.0.0.0 ocsp.apple.com | sudo tee -a /etc/hosts


It then said &quot;you REALLY do not want to leave that line in /etc/hosts—it MUST come out later!&quot;.
Does anyone know what the consequences might be of obstructing trustd in this way long-term?
OCSP requests send a hash for every program you run, so that trustd can report the information (to a third-party CDN run by another company, Akamai).  The purpose is to effectively verify whether the app that is launching is notarized or not by attempting to validate any Apple-related cryptographic certificates.  With the release of macOS 11, we could no longer block certain Apple OS services with apps like Lulu and Little Snitch, as per the new restrictions to how third-party kernel extensions can function as well as to their scope of control.  This feature was then removed with the release of macOS 11.2.
If you always know what you're installing and you trust the processes running on your Mac, there might not be an immediate consequence of blocking the OCSP requests.  Since they require an internet connection, you could instead toggle your network connection to resolve any slow-downs the next time Apple's servers freeze up.  If you want to block the OCSP requests, your solution should work (at least for that address).  If you want to disable the service, you can try the following commands:
sudo defaults write /Library/Preferences/com.apple.security.revocation.plist OCSPStyle None
sudo defaults write com.apple.security.revocation.plist OCSPStyle None

I can't verify that it will make a difference, since Apple removed the conventional method to accomplish the equivalent in Keychain Access → Preferences years ago.