Welcome to the Forum!
I agree re. poisons. Pets can also eat poisoned rats, etc. and consequently become poisoned themselves.
If you want a box to be used for sleeping/nesting by hogs the best thing to do is put a handfull of suitable material (ideally medium sized leaves, grasses, etc.) inside to give the hogs the idea and leave other suitable material in the general area. But the problem with changing the box to a nesting box is that you always risk the rats taking up residence instead, if there are a lot near where you live.
The reports of rats eating hibernating hogs may be exagerated. It may be that rats will eat hogs which have already died during hibernatiion. (Sadly hibernation is a difficult and complicated time for hogs and not all will survive.) If they are alive, I believe they are rolled up during hibernation so the rat would be confronted by a load of spines.
Not sure about babies, but I imagine if the mother was with them in the box she could quite easily prevent a rat from entering. Their spines are their main protection, but she could, for instance, roll up in the doorway. But a hog might choose not to have her young in an area where there are a lot of rats. However, other adult hogs may use the hog house for overy-day stays, etc.
If you want to continue feeding the hogs outside, you might like to try scattering the food for the hogs to forage. That way the rats can’t eat it all so quickly (or take it away to cache so quickly), so the hogs get more of a chance.
By the way ‘black’ rats can be brown!
Good luck. I hope you find a satisfactory solution for the hogs.