Recovery of critical materials from electronic waste