Actually there is a way to get a little better solution. I am developing it in my current game, although I don't have all the tech yet.
.
First off, I have a series of missiles called AMIRV's, they are size 5 active seekers with a range ~2.5M. Traditionally I have used them as mine warheads (4xAMIRVS + 4 MSP of thermal passives for a mine).
In this case, I going to build a size 24 two stage missile with 2 AMIRVS, ~2.5M ranged thermal seeker, and a relatively slow, long range initial stage. My tech is low right now, so range on this is ~23M right now. I am pretty sure I can fire these off at a waypoint, and if it gets a thermal contact, it will home on it and then pop out the AMIRV's at seperation range. If I understand correctly, when it gets to the waypoint it should just become a mine, unless it runs out of fuel. In that case, not sure if it self destructs or simply becomes a mine in place. I am calling these large missile torpedoes.
I am building destroyer raiders for a delivery vehicle. Stealthed out and packed with reduced weight size 24 launchers and macked out passives. They can lay traditional mines, or conduct hidden strikes on enemy shipping. I'll let yall know how it goes.