If you fly American Envoy into ORD, and you have a 21" roller, and you are on a ERJ145 or a CRJ700, you will have to gate check the bag. Waiting for that when you deplane, is a 10 minute wait.
10 minutes prior to departure, the cabin door shuts.
So a 40 minute connection with a gate checked bag is more like 20 minute connection in my opinion. And you are very much so relying on absolutely no delays. If you have to sit in a penalty box for ANY time at all, you are at risk.