Is it worth gutting it and repurposing the components?
While you may eventually get money for your parts, it may take a long while.
I would keep everything intact and try selling it. I hate to see these things get parted from easy fixes.
This model has issues with GPU failure that it is theorized that heat from the HDD is the cause of the failures. Many people, including myself, have done GPU "bakes" where you put the GPU in the oven.
From my research and personal experience, this has a high success rate of fixing the GPU.
The hardest part is taking the iMac apart and getting to the GPU requires the complete removal of the logic board.
It might be worth it to fix it yourself if you still wanted the iMac. I personally love the Mid-2011 iMacs, as there are a lot of customization that you can do with it. It is the only iMac where you can have 3 internal SSDs. If I ever got another one, I would put 3 internal SSD in and run it as a boot drive in RAID0.
You also see a lot of the custom stuff on ebay, sometimes going for a lot of $$$, but I suspect that they may take a long time to sell at those price. So, not worth it if you were selling it, but fun to mess around with if you were keeping it.
If you don't want to mess with the GPU, try selling it to someone that would want to fix it.
Would the memory from the 2011 iMac work in a 2019 iMac?
No, it isn't compatible.