On Engel groups, nilpotent groups, rings, braces and the Yang-Baxter equation