Yes you must clear customs and yes there is a passage from terminal C to Terminal E and from there to terminal D all beyond security.
If BA is delayed Pappadeaux at IAH provides the US's best airport-food, upstairs among the E gates if you have time, try the seafood gumbo. This is about 5-10m walk away, no security obstacles, from the BA departure-gate in terminal D.