Mega Evolution occurs before most actions except switching.
Source
Mega Evolution and Dynamaxing generally occurs after any switching has occurred.
Source
Therefore, it's safe to assume that Mega Evolution and Dynamax have same priority. They execute after switching and occur generally before all other priorities.
Damaging Z-Moves do not inherit any other properties from the original move, so have neutral priority and do not have the additional effects of the base move.
Source
Damaging Z-Moves, like Breakneck Blitz, Bloom Doom, Acid Downpour, etc. (the Z-Moves for type that are damaging) as well as other ones that are damaging have neutral priority, and don't have the negative or positive priority of base move i.e Dragon Tail has minus priority, but Devastating Drake doesn't.
In case of of Z-status moves, they carry the usual priority of the base move.
Source
Hope this helps!