You noted several possibilities for outlaws, and I think elves probably take
the long view of things. YOu never know what you're going to need in the
next 3000 years, so it's best to have all possibilities covered. I
certainly imagine there were times when the old elven kings of the First Age
wanted dungeons (did they have them? Can't remember.) There are
plenty of people Thingol wouldn't have minded imprisoning. And in a world
where magic is possible, however confident you feel about your magical
security, backup plans are probably a good idea. Also, if you've got
somebody you really do need to lock up, you want them locked up, not wandering
freely about your halls, even if they can't get out the main doors.
As for Aragorn and Gollum, I can offer theories on that too. Lorien
certainly wouldn't have any of the needed facilities. It's difficult to
have dungeons in trees, especially if the guy you want to imprison is adept at
climbing. And why not the Woodmen? Because it's easy enough to
imagine what they would do with Gollum, but it seems that Gandalf wanted Gollum
alive and able to talk. Taking Gollum to the Woodmen would not really
work for
that!