The way this is structured has 2 problems.
1) There should not be loops that do not allow the Wifi base code to execute at regular intervals otherwise a time out reset will happen. Normally this is done by ensuring the main loop code is running all the time with a maximum delay of less than a few seconds.
2) To get a new message the Webserver needs to have the server.handleClient() being called regularly. Once one of the effect loops gets control then that is no longer called so a new message can't be received.
You need to restructure it so the effects are in a state machine in the main loop not in the server.on("/" processing. You should not put a local while loop in each effect but rely on the switch statements being re-execute on each iteration of the main loop. That way the server.handleClient will be called each time round the loop; the message will get updated when a new server call is made which will then cause the different effect to get selected.