A court or police compelling someone to open their safe would tautologically be for the purpose of discovering evidence of a crime which is exactly what the fifth amendment protects.
The reason it's not a been a big deal is courts is because, if police have a warrant, they're going to hire their go-to safe driller to drill the safe open.
Fun fact, I’m UK based and should I find the police demanding I open my (gun) safe I would legally have to refuse until an authorised firearms officer is present lest I lose my shotgun license.