It should be safe. Though you may get some weird visuals. However, you should do that conversion on input and not on output so that you cannot store anything unsafe in your db.
I think it is. Though the normal advise is to use a prepared statement which also has the advantage of being more efficient.
However, I don't recognise the evaluate statement and a quick search didn't throw up any ideas. I would try without that unless you know for sure what it does.
There seem to be alternative formats available for the prepared query; the one you are using with an array and questionmarks, and one with an object and key names: