You're not doing anything wrong!! I understand how disheartening & helpless it feels though as it sounds exactly like my DS around that age!! I was tearing my hair out, trying everything & nothing worked. He'd just get so tired he'd eventually crash. It was affecting both his day sleeps & night in the end until one day he just went to sleep. Have had no trouble since thankfully.
I think it's a stage they all go through & we just have to ride it out as best we can. Do what works at the time & please don't beat yourself up over it, it's not your fault.

Oh & about the patting. I roll Moo to face me, put my left hand on his shoulder & pat his back with my right. He prefers to be on his tummy so I'll pat his back or rub instead if that seems more effective at the time.