Chi's can be nervy little buggers and I think you've identified a large part of the issue yourself - "He cringes from my dd who is 18 mths. She won't leave him alone."
If you want a haooy outcome you are going to HAVE to stop this from happening, for a start.
Use stairgates, a playpen for DD when you're in the bathroom, a safe, quiet and out of the way place for the dog to go to when he's had enough and instruct ALL the family to leave him alone when he's there, no exceptions. Maybe a crate for him to retreat to or to be popped in FOR SHORT TIMES ONLY when you are going to have to go about your business and can't suoervise. Never make a crate a place of punishment though and start by leaving the door open and feeding him in it to make him want to be in it. When you put him in there, give him some toys and a chew (and rotate toys so he doesn't tire of them).
I'm afraid that you are going to have to be strict with your DC and consistently lay out what they can and can't do wrt your dog. Likewise don't feel rude pulling people like your mate up VERY firmly - she should be preventing her child from acting as the child did. You'd rather lay down the law to your pal than see her child bitten, wouldn't you?
WRT bedtimes, please don't think I'm being critical - my 3 dogs (2 GSDs and a Lab x) all compete to sleep on my bed with me, but that's ok because they don't snap! Start a routine of last wee/walk, a treat and put pup into his crate (I've decided, half way through that this is not a perhaps buy, this is a definitely buy one!), just before you go to bed. He has hos safe place and you and DS have yours. Pup may cry/object at first, hence make lots of effort in the daytime to convince him that a crate is a good place. You may have to ignore him showing off for a night or two, though a jumper which smells of you as well as his blanket and a radio on low might be his comfort and limit or eliminate this. He will, if it's done properly, soon get used to the routine, especially if he's fed in the crate and gets treats in there.
WRT shouting at him - I'm not altogether against the idea as it CAN provide shock value but clearly it isn't working for you. It may well be making pup feel all the more insecure and thus think that there is reason to behave as he does.
You don't say how many children you have in total (brave woman, 2 are 2 too many here atm!), or what they are like towards pup and vice versa. Do you think that pup is feeling threatened or overwhelmed by a busy household/noisy children (no offence, mine are worse than anyone elses for noise!), frequent visitors, esp other DC or any such thing?
It really does sound like pup needs some space, some boundaries as to where he sleeps and who is entitled to be there and tbh some firm supervision and peristant "training" wrt your 18mo. Again, sorry that "training" sounds rude, I've had a crap day, am shattered and can't think of the right way to put it!
Dogs and young children can be done - there's 19 months between my two and both came home from the maternity hospital to meet our resident dogs. Those dogs are now passed away but I've had dogs all their lives - they are now teenagers and still live peaceably with 3 big dogs (although not necessarily peacably with me and if they don't shut the hell up and go to bed I shall feed them to the dogs!).
Finally, it may also be worth having pup checked over by a vet and ensuring that he's not in any pain and thus reacting to that, and consulting a behaviouralist too, which I'd seriously recommend. Speak to your breeder or local rescue and ask them to recommend a qualified, registered one.
HTH