Cooperative motion in biological microswimmers is crucial for their survival as it facilitates adhesion to surfaces, formation of hierarchical colonies, efficient motion, and enhanced access to nutrients. Here, we confine synthetic, catalytic microswimmers along one-dimensional paths and demonstrate that they too show a variety of cooperative behaviours. We find that their speed increases with the number of swimmers, and that the activity induces a preferred distance between swimmers. Using a minimal model, we ascribe this behavior to an effective activity-induced potential that stems from a competition between chemical and hydrodynamic coupling. These interactions further induce active self-assembly into trains where swimmers move at a well-separated, stable distance with respect to each other, as well as compact chains that can elongate, break-up, become immobilized and remobilized. We identify the crucial role that environment morphology and swimmer directionality play on these highly dynamic chain behaviors. These activity-induced interactions open the door toward exploiting cooperation for increasing the efficiency of microswimmer motion, with temporal and spatial control, thereby enabling them to perform intricate tasks inside complex environments.