I would not risk this. Deplaning and walking from a distant jetway just to get to Customs can easily take 30 minutes. Then an airside bus if you're lucky, then a walk (which could easily be 10 minutes) to get to your domestic departure gate. It would be a very tight race under the best circumstances.