RTSP to RTMP converting fails after specific time only when IP camera enters night mode
I've solved the issue by rebuilding the timestamps from scratch with -use_wallclock_as_timestamps 1 and -fflags +genpts.

/usr/bin/ffmpeg -use_wallclock_as_timestamps 1 -i "rtsp://${source}" -fflags +genpts -vcodec copy -acodec aac -f flv "rtmp://${dest}"

This is only a partial solution, or rather workaround, as it's still unclear to me what causes this behavior.