I have seen plenty of hostels using pine, which is quite soft. You might be better off with a harder wood, but I don’t know how hard it really needs to be in order to be strong and resistant.
In any case, it would be a good idea and paint or stain the wood and seal it really well. Some hostels even run a bead of silicon everywhere that two pieces come together to prevent bedbugs from nesting in the cracks. It’s not foolproof, but it may help.