TY was historically the proviso of South Dublin schools and the more elite boarders. The majority of rural students skipped it and hit University by 17.
OP sounds like he was in a gaelscoil - an Irish language school. The 'epidemiological institute' in question was either RCSI or UCD - fairly standard for 3rd level institutions to have relationships/programmes/open days with various feeder Schools.
The big red herring was the engine module. No 'affluent' school would remotely consider offering a course in stripping an engine over a semester in 1998 - far more likely that those Students were put learning classics, latin or ancient greek.