iOS 4.1 sms messages database to iOS 11
You may want to try migrating the data on the phone to an intermediary iOS. For example, if you're starting with an iPhone 3G (which has a maximum iOS of 4), then upgrade that phone to an iPhone 4S, (which can be updated to a max of iOS 9).
If you're able to upgrade from iPhone 3G to 4S, then you'll have your text messages on iOS 9.3.5, which should definitely be upgradeable to iOS 11.