Can not reproduce from the information given.
Would need to know more details about the issue such as enchants applied on the rod, Enchants applied to any armour the player was wearing, The type of fish farm, Server configuration, etc.
Also any logs of the time could help identify the issue.
Note: If you did not have the mending enchant on the fishing rod OR had any armour that had the mending enchant applied then it is possible for the rod to break over time.
Are you able to provide the server log from around the time it happened?
Using that exact design I can't reproduce on either single player or a multiplayer server.
Is it possible that the server that you are on has a patch to stop people afk fishing?