Using the ESF editor, open
COMPRESSED_DATA
CAMPAIGN_ENV
CAMPAIGN_MODEL
WORLD
REGION MANAGER
REGIONS_ARRAY (this is a list of all regions, find the one you want to make walled)
REGION
REGION_SLOT_MANAGER
REGION_SLOT_ARRAY - 0
REGION_SLOT
At this point you will see a list of a few variables on the right of the screen. 3rd from the top will be rom_minor_primary. Change this to rom_major_primary. Now under this open
BUILDING_MANAGER
3rd from the top you should see an entry for the settlement building type. Change the minor settlement type to a major one, such as rom_[culture]_city_major_1.
This method works with the startpos as well as save games, so you don't have to start a new campaign for this to have effect. Note however that the walls will not show up on the campaign map, only on the battle map. The siege mechanics still work like they do with a major city, allowing you to build siege equipment, etc.
Credit for this goes to yukishiro1 who figured out how to do this. I just stumbled across it yesterday and thought that I'd make a little tutorial so people can find it because I love that this is possible.