The 317 is almost entirely aluminum, to include the 8 round cylinder and steel sleeved bbl. Machining 8 chambers, flutes, and stop notches is much more involved than Machining 5 of the same on each cylinder. Sleeving an aluminum barrel shroud with a rifled steel barrel involves several more steps than just rifling a steel barrel. It's also rimfire, so the hammer, mainspring , internal firing pin, and several other parts have to be different than the rest of the J frames. The 8 round cylinder also requires it's own action parts so it's timed properly. There isn't a huge market for 22 revolvers either.
Essentially you have a relatively low production gun that requires several more machining processes than similar models, and it shares very few parts with them. That kills the economy of scale seen across the rest of the J frame line.