Generation of second-order triangular meshes in legacy FEniCS

This question has been asked several times, see for instance Is it possible to program (from scratch) a 2nd-order tetrahedron in FeniCs Legacy?

IMHO, the short answer is: while it is certainly possible to support to some extent higher order meshes in legacy dolfin, the most likely scenario is that you will have to implement it on your own.