After many hours of trial and error messing around with paths, and install scripts, and install script paths...
I FINALLY CREATED A FLATPAK!
Does it work?
MAYBE YES
Will there be bugs?
Yes.
Hope you enjoy.
I'll probably eventually add it to Flathub (though I expect that to be another can of worms I'd rather open when the app is a bit more stable)