Not a thermal designer, but have considered best way to heatsink epoxy-molded parts
like TO-92 BS170...
On the one hand, the chip is bonded to the DRAIN pin, so some heat is efficiently
conducted out the drain leg...much less heat to GATE or SOURCE pins. It might
be helpful to solder a copper "flag" to each drain leg.
On the other hand, these chips have significant area. Couldn't find BS170 die area,
but the IRF510 chip area is 2.5x2.21mm. If anything, BS170 is smaller. A large-area
chip transfers significant heat to epoxy. So Chuck's heat-transfer via the flat side of
the TO-92 is a good plan.
Where 3 BS170's have their gates biased near threshold voltage, red flags start
waving in my mind. Some BS170 data sheets show threshold voltage range
from 0.8V to 3V while others show a smaller range (0.8V - 2V). If you blow one,
consider replacing all three, and hope they're all from the same batch so that
their gate threshold voltages are similar.
Another concern is that gate threshold V is temperature-dependent. Should one
of three be poorly heat-sink'd, does it not tend to hog when biased near threshold?
Using one IRF510 seems safer.