Did you see the post from Yowie on an article linking IBS to autoimmune diseases? If I remember correctly, rheumatoid arthritis is an autoimmune disease. So IBS may be something he will also just have for the rest of his life. And evidence also shows that autoimmune diseases--in any form--are herditary: my mother has fibromyalgia and her sister has Crohn's and both had two uncles with Crohn's. If you have any other children, be watching them for signs of any type of autoimmune disease.
Miralax is used by a number of people on this board, so yes, it's okay to use for IBS. If I remember correctly, it's a fiber supplement, not a chemical laxative, so it shouldn't cause accidents (but I'd wait for confirmation from people who have actually used it!), but it may cause him to need to go to the bathroom suddenly and he may get bad gas cramps. If you do send him to school, make sure all of his teachers know that he has bowel problems and to let him go to the bathroom at once. No waiting for the bathroom pass, no telling him to wait until class lets out; he needs to be let go immediately and without question. But everyone may just feel better if he stays home for a day or two until you see how the fiber will effect him; it can initally give people very bad cramps. He might as well be at home for all the learning he will do if he's all cramped up. And the first stool he passes will be hard; he's got to get all the old, constipated stool out first before he can start passing the softer stools.
We had one young man on here who had accidents at school because of his IBS and he almost dropped out, but his school district actually had a program for kids who couldn't attend regular school for a variety of reasons and he was able to join that. They did class via the internet, I think, then met once or twice a week in person for an hour or so. With all of your son's problems, you might want to look into homeschooling him yourself (if you don't work full time) or see if your county has some sort of program for chronically ill children to give them some schooling, but outside a normal classroom. Because when it's not his IBS acting up, it'll probably be his arthritis.
You'll have to be the judge of your child's school, teacher(s) and classmates, but it may be helpful for the teacher or school nurse--when Josh isn't there--to talk to the kids about why he has to miss school sometimes. Explain about him having severe pain and stiffness in all of his joints sometimes and how sometimes that makes him sick to his stomach too. I think, in most cases, kids will be more understanding and less likely to tease when things are explained. I think most schools have found it's better to just tell the class that so-and-so has cancer and this is what will be happening to him, rather than just let the kid come back to school one day with no hair. Kids understand pain and can have sympathy for another person in pain, or having to go to the doctor and get shots all the time, and being too sick to have fun, etc., but they have to be told that's what's happening. They can't reason that something's wrong with someone else just based on symptoms, like an adult can. I can remember when I was in elementary school (4th grade) and a boy with Down's syndrome was sent there for special education. Our teacher and the special ed teacher talked to our class about what Down's syndrome was, why he looked different and what he could and couldn't do, since we'd be sharing lunchtime and playtime with him. They also made it very clear that teasing him was mean and would not be tolerated in the slightest. And the kids were all very nice to him and purposefully picked him for games and talked to him at lunchtime, etc. And I think that's just the best way to handle a situation where one child is significantly different from his peers; if kids are talked to about it, if they are made to understand, they are a lot less likely to tease. Teasing oftentimes comes not just from being different, but being different in a way that a kid can't understand.
If you do take him out of the regular school system, make sure he does have a social outlet of some sort. There are all sorts of homeschooling clubs that meet to go on group field trips or play sports together--any way to bring the kids together. You may also find some sort of sport that he can do that's not high impact on his joints, like horseback riding and swimming, and that will give him a chance to make friends.