What I ended up doing was:
- Place a major tick at every power of 10, until you get really close to the origin (infinity). Also place a major tick at infinity.
- Place 9 minor ticks between each major tick, corresponding to changing the most significant digit. So 2,3,4,...9 between 1 and 10. 20,30,40,...,90 between 10 and 100.
- Place labels on every major tick, until they get too close.
- Also place labels on minor ticks, from right to left, whenever there's room.
The result looks like this:
Which is not great (and the colors aren't quite right), but it's good enough for my purposes for now.