Welcome to SubSim!
One mistake I used to make that normally ended up with me eating torps from a surface contact was waiting too long for a perfect solution.
Recently I've been happy to shoot at targets with ~50% SOL as by then the bearing is usually good enough for your torp to find it. Set your activation distance to something reasonable and make sure you keep the wire - this is crucial as you wont know the distance to the target.
If you lose the wire then treat your torp as a threat and get away from it asap.
Doing this will normally let you get the first shots in before the destroyers are in range to reply. The only thing you need to worry about then are aircraft, but that's a different story...