Knockout outline of text from text behind it

I know I can knock out the outline of text from an image or object by using the “subtract selection”. But is there any way to make it so the outline will just be removed from the text behind it?
the only workaround I’ve found so far is to:
Export the text layer behind as a PNG and inserting it again → Then making a dublicate of the text, removing fill and making a stroke → then using the “subtract selection” → and finally inserting the text with fill again.