The good news is the game coding isn't that diligent. There are already a couple mods that add carrier submarines by doing little more than adding 'submarine to the ship_type.
steamcommunity.com
steamcommunity.com
I've been experimenting with adding new stats to naval modules without much luck. My focus has been on adding commander stats that'll allow you to reload torpedoes faster or have improved fleet coordination. I believe those stats are hard defined in the defines file, which i'm hesitant to mess with (anytime I have has always resulted in a crash).
You inspired me to look at rocket artillery coding. As I feared, it does little more than add soft attack and breakthrough stats which doesn't help if you want to attack buildings. I think the most realistic approach is creating a new plane type with the Japanese suicide plane mechanic and just make it really fast/agile so it's not easily shot down. Give it a building attack stat and its now a missile. Also, I don't believe losing planes impacts your manpower so that's a bonus. The challenges with this approach is you can't limit the other planes from being stationed on the sub and you can also launch the 'missiles' from any airbase so missile spam.