Is the attack "Flail" of Magikarp worth it?
Flail can be, potentially, the most powerful move of Gyarados.
It's a bit risky, because your Gyarados will need to have less than 35% of its HP to "generate" a powerful Flail.
Also you need to have a good speed to ensure to be the first to hit each turn. Gyarados has a discrete 81 Base Speed value, so it can be "outspeeded" from a faster enemy.
In short, the more powerful is the move, the more fragile is your pokemon. It's up to you.
To answer your second question: no, your Gyarados' stats will be the same regardless the level you evolve it. They only depend on EVs, IVs, base stats, nature and level of your pokemon, and the only things that change with evolution are base stats.
PS:
That's not true that if you didn't evolve Magikarp until level 30 you'd be missing out other moves which Gyarados would learn, because you can always teach them with the Move Reminder.
No. Flail is not worth it. Gyarados learns much more powerful moves between levels 20 and 30, totally invalidating Flail.
To expand slightly, if you didn't evolve Magikarp until level 30, you'd be missing out on the following moves which Gyarados would learn:
- lvl 20 - Bite (a physical dark attack which may cause flinching)
- lvl 23 - Dragon Rage (a special dragon attack which always does 40 damage, regardless of effectiveness)
- lvl 26 - Leer (a status move which lowers the opponent's defense)
- lvl 29 - Twister (a special dragon move which may cause flinching)