I tried that some years ago, and it worked well to some degree.I did not do extensive tests, though.
You would need a toolchain/IDE that supports both the LPC MCU and the ST-Link debugger.
Segger has a firmware for the (onboard) ST-Link, to convert it into a JLink.
That would work as well, but Segger's licence conditions explicitly prohibit the use for any other target than STM32s.
But Segger has a similiar firmware for LPC-Links. https://www.segger.com/products/debug-probes/j-link/models/other-j-links/lpc-link-2/
Perhaps worth a try, if you have one.