I was told this when I was younger. I think it's less about the sweater causing the breakup and more that a sweater is a lot of work and you'd feel really awful giving someone something you worked on for months and months (don't judge I'm a slow knitter lol) and then them breaking up with you later and either giving you back the sweater you made for them (awkward, I guess?) or walking away with a priceless item that you spent a lot of time making.
I personally think everyone has a different threshold and if you like making sweaters then make them for whoever you like! Heck make them for random strangers if that floats your boat. Half of the fun is in making things, and you can only have so many sweaters before you have to start giving them away anyways.