Generation 6 made it so you could re-learn any move that a Pokémon knows when it hatches, meaning you could re-learn egg moves if you forget them.
Generation 8 made it so you can re-learn any TRs that you previously taught that Pokémon then forgot. This doesn't work for TMs since TMs are infinite use, so it may be worth considering letting TMs be re-learnt if they are set to single use in the config.
Reference: https://bulbapedia.bulbagarden.net/wiki ... able_moves