Can we remove the code of the unwanted registers when we create custom AXI Lite peripherals or reduce the data width to reduce the used logic
I would say you can certainly remove what is unwanted in what you create. It's all yours.
Maybe you meant the code generated when creating an AXI peripheral in Vivado ("Create and Package new IP"). I think that code is a base that you can modify to fit your needs.