I made a test model based on the central branch of your model in the area surrounding the 'DefinitionQuery' script. Firstly, in your definition query model parameter, I believe for the SQL Expression you need double quotes surrounding the field name ("REF_SURVEY_ID" = '%Value%').
The other thing I am thinking is the logic/order of your tools. In my test I applied the 'DefinitionQuery' script on the Make XY Event Layer output and then applied symbology and finally, saved to a layer file for exporting or emailing as attachment.
To do this I added an output to my DefinitionQuery script so that I could set a precondition on the 'Apply Symbology From Layer' tool. This way I made sure that the DefinitionQuery was applied to my XY Event layer before further processing (you cannot set a tool as a precondition for something if it does not have an output). This idea comes from this esri forum post I found: Preconditions for Python scripts.
I added a boolean output parameter to my DefinitionQuery script and I set this value it in the python code (arcpy.SetParameter(2, 1)).

