Talk to a local accountant, not Reddit. Tax rules in Nicaragua for foreign remote income get messy real quick, especially with residency through marriage. One wrong move and you're explaining to two tax agencies why you didn't pay. My friend did similar setup in Costa Rica and got burned because he listened to some guy in co-working space who said "nobody checks." They do check.
Yes I want to do things the right way. Also I thought having residency would make things easier. Also with it being US income could I still contribute to retirement accounts 401k and Roth
if the work is performed from within a country, this is local income.