That is a very sad story and must have been very distressing to witness.
Normally hedgehogs natural protection of raising their spines would provide sufficient protection against a rat, which makes me wonder whether the hedgehog was already unwell – They can sometimes look reasonably well, seemingly eat normally, etc., when they aren’t. All those spines can cover up a multitude of things.
With regard to hog boxes, I can completely see your point. I have sometimes wondered about the potential problems of being trapped in a box, not only by rats. But likewise, if there were other entrances/exits, a hog could find itself having to defend both entrances. i.e. they could roll up and defend one entrance, but not two at once. In some ways hog boxes are not ideal, but better than nothing, bearing in mind the lack of suitable habitat in which to build a natural nest.
But hogs are at risk from predators in natural nests as well, particulary if they are asleep or hibernating. Also natural nests (hibernation nests, in particular) are pretty substantial consructions, with vegetation woven and layered together, so that it may not be possible, (at the least possibly not easy) even with a natural nest for a hog to escape by another way. But with one entrance they can at least have their spines against the entrance, affording some protection.
Having said that, I only recall one previous instance on the Forum of reports of a rat attacking/eating a hog and that was a hog which had been hibernating, which may alreay have been dead. Balance that with the probably thousands of hog houses which are occupied without incident.
So I would suggest keeping the hog houses, for now, but to improve the habitat in your garden (and encourage others nearby to do likewise) – maybe plant some, or more hedges, so that the hogs have the opportunity to build nests within the hedges.
You might like, at the same time, to take steps to deter rats from the area. Personally I wouldn’t want to use rat bait, even though rats are probably my least favourite animal. I know what a distressingly horrible death that can also cause. So that I prefer to go down the deterrant route. But if you did decide to go down the bait route, I suspect that hoglets could get into those bait boxes, so it may be best not to use them when they are around. Also hogs can be much better at climbing than people give them credit for, so that I would suggest that putting any kind of bait as low as 2 feet is not adequate to safely prevent a hog from becoming poisoned.
Good luck with the rest of the hogs. I hope they all return safely from hibernation.
P.S. Apologies if this appears twice. I made the mistake of editing it slightly, which the Forum doesn’t always like at the moment, so the original might eventually appear as well!