The Canon EOS M5 Brochure indicates that you can use the Canon Remote Interval Timer TC-80N3 with the EOS M5 by adapting it with the Canon Remote Control Adapter RA-3.
So, it would appear that you "should" be able to put the M5 in Manual Mode, select Bulb and the TC-80N3 / RA-3 combo "should" drive it from there?
Cheers
Dennis
EDIT:
See here:
https://www.the-digital-picture.com/...spx?News=15412