Created for Minecraft 1.20.1, but it should likely work just as well on 1.18.2 & 1.16.5
If anything doesn’t work as expected — feel free to leave a comment (on curseforge)!
https://www.curseforge.com/minecraft/data-packs/convert-vanilla-horses-to-swem-horses/comments
Command used
execute as @e[type=horse] at @s store success entity @s[y=-64,dy=320] Pos[1] double -2112 run summon swem:swem_horse