iPhone and iPad says IMAP server is not responding after password change, but works on other devices
So I never figured out what exactly the problem was here, but the culprit must have been some sort of cached something on the devices.
A few days ago, I once again edited the accounts on the devices – and lo and behold, suddenly it worked on both the iPad and the iPhone.
So whatever it was that was cached (?), it must have been flushed (?) after a certain amount of time had passed, and then things worked as usual. All it needed was a bit of time.