I think the DMCA protects them against liability for simply staying within the DMCA safe harbor. But if the claim itself was malicious, the DMCA does allow you to sue the person who made the claim.
A cursory googling suggests DCMA takedowns would take 1 day, 72 hours, or up to 10 days on various websites/services. If the law does not mandate it be that fast, then Heroku and Hetzner's alleged actions of less than 2 hours notice would indeed be tortuous and interference with business. They are backbones for businesses, they are not twitter.
The DMCA requires that service providers who wish to benefit from the safe harbor preventions act on takedown notices "expeditiously". No precise quantitative minimum or maximum timeline is provided by legislation, but under 2 hours is certainly expeditious.
Morally and in terms of business sense I agree with you, except I might argue that 2h is too short even for randos on Twitter (especially late on Sunday night) when the allegation is of trademark violation instead of something more urgent to resolve. Trademark matters by definition impact commerce alone, unlike if the Twitter account were compromising computers through malware or harassing or stalking humans.
But to the extent US law applies and the other required details of the DMCA safe harbor are attended to, I do think the DMCA prevents the service provider from monetary liability in this scenario. Of course, criticizing them for acting rashly remains 100% fair game.
(As to the question of whether US law applies: one example you were discussing, Hetzner, is based in Germany and not the US. But I can imagine circumstances where US law might sometimes apply to them anyway, and/or Germany might have similar laws. I'm not an expert on the international angle here, and I'm not a lawyer in any case.)