I had the same issue. After stopping the app from the Seetings>Apps menu Firefox ceased to annoy me with failed background stuff. I haven't used it ever since.
I don't know why Firefox assumes it's ok to start background processes and I've never bothered to check. I know FF on android still shares usage data (or whatever) despite unchecking the box in the settings. So I assumed it had something to do with that.
I think it's a bit premature to assume you've been hacked because FF generates errors. It's certainly not trivial to hack into a GOS device and I doubt that a sophisticated attack would solely rely on Firefox. Before you start to reset your device try to rule out any other possible explanation for FFs behavior. Then, if being hacked is still the most likely explanation proceed with a clean reinstall of GrapheneOS.