Nominally, yes. Real, no. (In practice, given the barter resemblance of the trade, there would be no impact.)
In your $50 trillion poem example, no money can possibly flow into the real economy because you simply do not have $50 trillion to pay anyone - you're just describing a wash trade of a worthless $50 trillion IOU note not unlike a NFT or crypto memecoin. Best case is that the poem is worth something non-negative.
I believe it has it's own name - The double Irish.
Not coincidentally, Ireland has one of the highest GDP per capita in the world.
It would not work between the US and Ireland.
>Who calculates GDP?
>Economists at the U.S. Bureau of Economic Analysis estimate GDP using thousands of data points gathered by other federal agencies and some private data collectors.
I presume these economists would ignore outliers such as that example, especially ones that would result in unrealistic sales tax or other tax liabilities.
They have a spreadsheet showing sources here:
https://www.bea.gov/data/gdp/gross-domestic-product#:~:text=...
> https://hyperallergic.com/51913/the-shadowy-world-of-art-in-...