An iron- plastic-scintillator shashlik calorimeter with a 4.3 $X_0$ longitudinal segmentation was tested in November 2016 at the CERN East Area facility with charged particles up to 5 GeV. The performance of this detector in terms of electron energy resolution, linearity, response to muons and hadron showers are presented in this paper and compared with simulation. Such a fine-grained longitudinal segmentation is achieved using a very compact light readout system developed by the SCENTT and ENUBET Collaborations, which is based on fiber-SiPM coupling boards embedded in the bulk of the detector. We demonstrate that this system fulfills the requirements for neutrino physics applications and discuss performance and additional improvements.