20 sounds absolutely absurd. I think 5 is still OK, but if we increase it, I say 7 perhaps. If we go any higher I think it may become important to start looking for redirection loops to prevent unnecessary location following.

I do agree, 10 seems like an upper limit to consider, but even that seems too high.

I think it may become important to start looking for redirection loops

That came into my head as well, break if the location being requested has already been requested with the same params? I can see that causing issue though for someone, ie: /node/something/ => /create/something/ => /node/something/ - not that I'd ever recommend someone do that, but I can see someone implementing that

Setting an upper soft limit (ie. changeable upon request) of a sane value sounds better to me; 7 is a nice human-random number in the right range, but still has the 'low' look to it.

The downside to having the redirects too large is the latency in requests, it can easily add up to 1s waiting for a HTTP response right now, and thats on a reasonable connection (200ms is not unreasonable for a single request, anything up to 500ms should be assumed to be a reasonable redirection response IMO), so going too high can introduce perceived slowness (even when it's not WordPress's fault that a plugin has made a request for a infinite-redirecting document)

Just for some feedback: I opted for 20 because it's the PHP default. Probably users expect it, probably the PHP folks made their mind about, so I thought it's not that bad to stick with the default (before deferring with any details).

Looks like 5 has been chosen for a reason. As long as there is no really reason to change this I consider to close this as worksforme as I did not run into any problems and was merely looking for a documented decision-base for the number of redirects - which I found now.

If someone else considers change of the value should feel free to re-open.