I've been very close to a situation very similar to this, where a person spiralled really (=very physically abusively) badly with a new pet, came to their senses and felt horrified after a few months, and spent years doing all they could to put it right and undo it.
So first thing to say is, I believe you, when you say how bad it was, and that you want to fix it, and I hope for your and the cats sake, you truly can and do. If you can't, or it ever happens again (even briefly and uncontrollably, then get help and make the cats safety the priority immediately. As it has already happened again, you need to look at what that means. I'll try to cover a bit about both aspects - you, and her.
Overview
Cats and dogs are often very much more able to forgive than humans can be. It takes time, but gradually it will work. But abuse can leave lifelong emotional scars and changes to behaviour, so some traits and safety habits may take years to fade, if they ever do, and you may be able to see them at odd moments or "under the surface" for her entire life, long after she has forgotten it.
Let me tell you about the case I know. A friend had a cat, and they were in a bad mental state (meds issue), and the cat - about a year old - took the brunt of it for 4 months until the meds issue was fixed, at which point the friend was horrified and confided in me, asking what to do.
[Trigger warning: details of abuse]
The cat had been chased around and "forced" to interact. When the cat reacted by seeking privacy/corners the friend had tried to win the battles and ever more extreme physical actions to "dominate" and "win", and not allow the cat to "win" or "get away" with undesired behaviours even though completely normal. The cat was stressed beyond belief, had no "safe places", was hypervigilant and overgrooming, expected an attack behind every interaction and distrusted people, and had learned to attack in self defence, making it hard to be sociable with. It had just spiralled, and got worse from there with physical throwing out of rooms (bodily midair into whatever was there), using cushions to pin her down, and you probably get the idea.
The owner restarted their meds, and a while later reflecting on it, broke down crying, which is where I got to hear about it. The answer we followed was basically, a lot of respect for the cat and the cats experience, and reestablishing a new norm. But I also needed to be sure it wouldn't happen again, not least to decide whether the safest advice was to give the cat up entirely, for his own good.
So I'll start with looking at your own position, then move onto the question you ask about the relationship with your cat.
I think that's the right order - if you aren't safe for her for the rest of her life, your only valid, ethical relationship with her is one that starts at home and ends up at a rehoming centre or shelter within the next 2 or 3 days.
First thing - it's about you as well
Your post says you want to fix things, but it's not clear if this might (or will) repeat, or if it is completely and forever in the past.
What's scary is that even after you realised you did it, you then did it again. I think you ought to be scared at that, and I hope you are worried about yourself and other people and animals, not just thinking "how do I repair things" and ignoring the risk it happens again - perhaps worse.
So the first thing is, something I can't advise on - you need to think, what you want for yourself. Whatever led to this, is it possible it could happen again? To people or animals? Worse? Is this something you need help with (for example, to avoid a criminal record as a violent abuser in future, or to learn anger/mood management?) Should you seek help now, before worse harm/trouble?
I can't comment much on this as your question is mostly about rebuilding a shattered relationship with your cat. A lot depends on what led to these awful events, if you know what it was. But it should be a real question in your mind, and maybe a question in its own right - "I abused my cat badly, should I seek help, if so what kind?" There is a very good chance the answer should be yes! quickly!
With that, let's turn to the puss. If you are safe for her, then your question "how to rebuild things" is a good one.
Respecting her needs and experience
The cat I mentioned was emotionally scarred, distrusting, and traumatised. So she needed that respected. When she said no, it needed to be understood that this wasn't petulance but learned self defence. When she was nervous of people, it wasn't antisocial-ness but learned safety. So she needed to be given that space. We let her have the safety and reassurance things first, and tried to win trust later.
Typical example - owner enters room, cat hides under cupboard and hisses when approached. Before, he would have offered her food, been angry when rejected, and forced her out into the open to have it.
So instead we let her hide there, so she knows she has safety and can begin to explore beyond crisis and survival stuff. We ignore her, not looking, so she can feel a sense of agency and control, and watch us as she chooses without us "doing" anything related to her. Then we offer a treat maybe a metre away from her, quietly, hold it to sniff if she wants, and when she rejects it (which we expected and she did), we quietly put the treat down on the floor, and left the room, closing the door. If she ignored it, we quietly picked it up later, and maybe tried again that evening. After a couple of weeks, she learned it was safe and there was no comeback, and began to trust it was OK to come out and take it. 30 mins later we'd come back in, minimising her stress and giving her lots of time to not worry about humans nearby. We recognised that for her, even "human offering food" is a stress, as she can't be sure what their intention is or what will.follow.
You can build on things like this, but you need sensitivity to her needs, anticipating what will give her emotional space to start moving beyond the past. If you can do that, your cat probably will.
Safe spaces
Also ensure she has plenty of safe spaces available. A safe space is one where she can go, and you don't intrude or constantly tread over, but she can relax and you respect it is "hers". Somewhere she can feel safe from surprise attacks, and see what's going on. My partner's cat has this:
Its a shelf over the foot of the bed, high enough that we wont accidentally knock it, with a cupboard door removed to make a "cave". There's a cat bed warmer under some towels, too. We made it after we realised that she kept trying to find a place to watch from where people didn't tread round and over her, and everywhere she chose was somewhere we went. This stressed her. So this gave her a raised viewing point, a "cave", and a place she could be sociable but also a bit "to herself" too. She quickly took to it and often sleeps there. We take care to make sure that she feels safe on it.
She likes to have 3 or 4 places, including a cardboard box under the bed, a space under the hall table, and a kitchen chair. The point is, she has spaces where she can go, and chill, and feel safe doing so. They are, in a sense "her spaces", we can intrude on them, but we try to ensure she knows its fine to go there.
Establishing a new norm
The other thing is, respecting where she's at, does not mean "everything now on her terms". You might need to check her collar, or flea-treat her, or comb her, all of which she may not like, and may trigger self defence. You'll need to make these as unscary as you can.
Offer a favourite food once a day, and when she is ok with that, and will accept it from your hand (it may take a long time sitting until she gets sufficiently brave to go for it), you can try to gently introduce whatever else is needed, like a combing. Maybe just stroke her once really lightly with the back of the comb, it does nothing but shows nothing scary happens, with luck she isn't put off her treat next day. Try to build it up really slowly enough that she doesn't gets huge "OMG" and stay away next time. Watch her reactions and behaviour, and be guided by those only. Allow that it may take 10 or 15 minutes, or a specific mood or time of day, for her interest to peak enough.
Summary
Above all, be patient. It could be a lifelong endeavour. But you'll get there with care and love - and so, eventually, will she.