Installing custom firmware on a 3DS is as safe as console (soft)modding can get. You have to do stupid things
on purpose ignoring warnings to brick a 3DS. Please use the guide
https://3ds.hacks.guide/ and not any random video tutorials. Do not skip any steps like the SD verification and NAND backup.
There are 3DS mode flashcarts (Sky3DS+, Stargate3DS). They are
really expensive and have a lot of limitations (they are only able to run unmodified ROMs from the same region as the console, no eShop-only games, no out-of-region, no romhacks, no homebrew¹). Most GBAtemp members advise against getting such an expensive cart because of all these limitations when free CFW can do much more. And before I forget this: I've read that using
.3DS ROMs via flashcart online requires getting something called private headers in order to prevent online ban – while installed
.CIA files with CFW don't seem to cause any bans.
If you decide to get a 3DS flashcart anyway and encounter any problems: You won't get much – if any – help here on the forum and will be told to "ditch" your expensive cart and install CFW.
Flashcarts for the DS mode (mostly recommended is the R4i Gold 3DS Plus with internal switch for ntrboot) are way cheaper and more versatile: They offer all possibilities (DS ROMs, DS homebrew, romhacks…) but of course the limitations of DS mode apply – it does not make use of the 3DS hardware which is way more powerful than the original DS.
If you have any further questions or problems, just ask.
Good luck and have fun!
________________________
¹Technically it is possible start homebrew from flashcart by using a ROM that is an entrypoint – like Ocarina of Time 3D or Cubic Ninja. However, homebrew does not always run reliably from userland entrypoints – especially on high firmware versions.