Starting from Firefox 131, released yesterday, text fragments are now cross-browser, aka Baseline (newly available). You can also style the highlighted content with the ::target-text pseudo-element. I’m still getting over the #:~:text= thing, but it might be a good moment to start using it.
@pepelsbey https://bugzilla.mozilla.org/show_bug.cgi?id=1779688 should make it easier to create such links