The timeline is a bit out, but I'm pretty sure the book you are looking for is Pushing Ice by Alastair Reynolds.
The story involved an alien vessel/asteroid coming through our solar
system and a human ship going out to meet it and then being stuck on
it as it continues out into deep space
The crew of the Rockhopper get tasked with following Saturn's moon Janus, after it ditches its disguise and starts heading out of the solar system. The Rockhopper gets caught in its wake and finds it impossible to stop, and so ends up travelling on Janus to its destination.
As they explored the alien vessel they encounter other alien races who
are also stuck, some of them go round looking for new arrivals to
steal all their technology
The Rockhopper eventually ends up in a giant structure which is populated by other species that have also been trapped. One of these species is the Musk Dogs, who along with several allies go around stealing technologies and resources of new arrivals.
When they first land they find spires sticking out of the surface that
are rotating with near infinite torque so they use this to generate
It's this part which makes it certain to me you are after Pushing Ice.
After finding a very slowly rotating spire and using its incredible torque to generate power, a technician is killed when he repeats a regular inspection several times in repetition around it - it's discovered that Janus punishes repetition, and so the crew take to carrying around methods of introducing randomness into their lives (dice etc).