How can I keep screws secure over time in a loft bed kit?
I would use something a little less rigid since you probably want to be able to snug the screws down the road. Wood tends to shrink and deform, and if you lock the screws you won't be able to do followup snugging.
I'd use a low-strength threadlocker compound. This should allow snugging without needing to remove screws and reapply.