Following the good article "Adding renderers and templates to your Moodle plugin" by Mike Churchward it is simple to understand how to add new renderers and templates to display a page. What I still can not figure out is how can I override few templates used by mform to display mform elements in the frame of a new plugin.
Moodle uses .mustache element templates from lib/form/templates. Following https://docs.moodle.org/dev/Templates I tried to override few of them by duplicating them to to my myplugin/templates but they are not loaded (of course). I am not sure about how to use render_from_template only for some mform element. For instance: I want to accept all the templates used by moodle for each mform element but not the one used to display, let's say, the "select" element (element-select.mustache). How can I override it only?