There are two paradigms I see people use to solve this:
1. Text back as soon as you see the message and be okay with your response not being optimal. This is what I do the most.
2. Don't open the app to read the message until you have time to respond, then commit to responding. This way you'll have the message notification reminding you to respond and you don't leave your friend on read.
Then you end up with unread messages for weeks at a time.
If people are a priority for you, then you need to just make time. No one is unable to spare 5 minutes to text back. You just have to sacrifice 5 minutes of something else, whether it's work, a video game, or a hobby.
If you can't spare that, then I guess accept that those people aren't that important to you.
The great irony is that when they aren't important, the response is quick and easy. Your poor choice of words can piss them off and you don't have to care.
For example, when you take 24 hours to respond, the message you're sending is that the person is a low priority, regardless of what text you've composed.
People who feel that anxious about composing the best reply should seek therapy to help them tolerate the distress of doing things imperfectly.
A person I'm close to does this (takes days/weeks to respond to anything). Important as they are to me, I've basically written them off as someone I can rely on.
I have also gone days without even noticing that I got a text, but it has never led to much trouble.
I deal with it this way: The people I care about I frankly say "Look, I only prefer to communicate at certain intervals during the day because I'm usually in flow or focused. Please text and call, but realize if I don't answer it was because I was in that state. Sometimes I come out shortly, sometimes it is a few days".
Texts, calls, etc go unanswered until I'm ready on my time.
You'll have to tailor to the person though... some extroverts forget everything they read and/or have low impulse control, some introverts forget everything they hear.