you're right, iphone can have carddav accounts, but you can't migrate easily to a selfhosted carddav account even on Apple.
If you want to transfer contacts from the main addressbook you have to go through iCloud and export to vcf for a full take, last time I checked on iOS 12 I wasn't able to copy between addressbooks. Sorry if this has changed.