The Cantor–Bernstein–Schröder theorem via universal algebra