As a PP stated, Disney doesn't really offer "restroom access work when you're in line for attractions."
DAS may be an option, feel free to stop by Guest Relations and ask, though I've read varying reports on whether people were successful obtaining a DAS for such needs.
Our best strategy is to 1) never pass a restroom without stopping, 2) never enter a queue without visiting the restroom, and 3) always know where the closest restroom will be if you need to leave a queue/attraction quickly. If you find you must leave the queue for a restroom need, speak to the CM on your way out (have DH go on ahead while you stop); they may offer something for when you return. It can be extremely hard, sometimes impossible, to try and "re-join" the line at the point you left even if someone from the party remains in place. Many of the people you need to squeeze past may not have been in line to see you leave, and unfortunately due to poor guest behavior with line-jumping, some guests won't let you past them. Particularly for adults (when it's obvious someone took a toddler/preschooler out for a quick potty-break some are more understanding). So I don't recommend trying to rejoin the queue; speak to the CM about your options. Try to FP+ the rides that are most likely to have the longest queue waits.
Also as a PP mentions, be aware of not just long queues but also ride/attraction length and whether there is an easy-out if needed. Ellen's Energy Adventure is a long ride (45 minutes). Carousel of Progress has no exit once the show begins. Soarin' has a long (distance-wise) queue at approximately 1/4 mile long. Ask the CM if you aren't sure. And I suggest having a back-up plan in the event a ride breaks down and you are stuck for a period of time.
Enjoy your vacation!