CIC officer gets the details from cbsa. We have the checkbox to consent to get the records.
I commute daily(till precovid) from Canada to US from 2017 hence i have 100z of entries without the entry stamp of Canada/US. We all can see the I94 history in US side which the exits are shared with Canada and CBSA records will have all entry and exit details. Even though US never stamp while exiting, we can see that we exited and entered canada because cbsa shared the entry details to US so that US records the exits.
Its not nearly impossible to maintain unless one did not plan for it. I have all the records of entries as i update my own google sheet since the day 1 of my Canada PR.
Even if you dont have the travel history then get the US side records (from
https://foiaonline.gov/foiaonline/action/public/home) and you can know the dates. We are discouraged getting the records from cbsa for citizenship purpose hence get it from US side.