Sorry for the late reply, I think this would work:
mytheme/classes/output/format_section_renderer.php
and inside you have
mytheme/classes/output/format_section_renderer.php
and inside you have
namespace mytheme\output;
require_once($CFG->dirroot.'/course/format/renderer.php');
class format_section_renderer extends \format_section_renderer_base {}I've not checked it though, but that's what I would start with.