I think this is actually a somewhat complicated subject, and quite important, since we are all getting older and older and the hills are getting higher and higher
Physics dictates that a longer cage size has no impact on the
maximum allowable size of the rear sprocket, however all else being equal it can potentially allow a
larger large rear sprocket (not exceeding the maximum size) because it can take up more slack in the chain.
As such the example suggested by alecs is directionally correct. Regarding the specifics certainly 32 tooth might not always be compatible with a road mech, but anecdotal evidence suggests that it is not necessarily incompatible either.
Regarding the maximum allowable rear sprocket size, Shimano's spec is generally conservative (and I am not sure if they have a lot of incentive to stop customers buying new mechs for different gear arrangements). I happen to run a Tiagra SS with a 28 tooth cassette on my Cadenza, it is obvious that 28 tooth is still some way from the maximum allowable.
For a given frame/dropout/mech, the B screw adjustment plays a critical part in determining the maximum sprocket size allowed.
This explains not only how to establish but also potentially extend the true maximum sprocket size for a frame/dropout/mech combination.
For a given frame/dropout/mech and B screw setting, because what physically limits the maximum rear sprocket size is the clash of the top pulley with the large sprocket, there are also reports that using a smaller (e.g. 10 tooth) top pulley to replace a larger (e.g. 11/12 tooth) one will also increase the maximum allowable rear sprocket size.