Few recipes stretch a pipe this far. One metal pipe turns into five torpedoes, where in a mortar it gives three fragmentation shells. The gun powder barely registers, so the whole decision is about the pipe.
That makes it a question of timing. Before a Level 3 bench, pipes are loot, and a group still short of its first rifles or a launcher should not sink pipes into the sea. Once your sub is really going out to hunt, craft several batches at once. Asking for a single torpedo still costs a whole batch, and the spares are exactly what you will want after the first miss.
Watch out
Don't recycle unused torpedoes to get the pipe back. The recycler returns it only now and then, and the powder barely at all.
Fights between player boats on the surface run on cannonballs instead, a Level 1 craft with no pipe in it.