You're right, I'm using lz-string to compress the text before shoving it in the URL. This is definitely a necessary evil for the time being so I don't need a back end component to the app. But eventually I do want prettier URLs and collaborative editing if I can make that work without it bankrupting me or driving me insane.
For what it's worth, the typescript playground takes the exact same approach as you, placing a compressed (lz-string) copy of the text after the #code/ in a sharing url.