Lots of answers without asking much about the hunting environment. That can be significant, especially for the optics, and especially for distance and light level.
Wow folks. that is a lot of info. Everyone has their favorite ways. My friend will be taking me out to Hog hunt in a couple of months. I have not hunted anything in my life. I have fired a lot of weapons after over twenty years in the Army but decided in my old age to shoot those nasty hogs. I think that would be the only thing I would hunt.
While anything that will kill a deer can kill a hog may be true, the smaller the caliber (generally speaking), the smaller the sweet spots and the more precision that may be needed. Going with a bigger and more powerful round is the side to err on, going with a larger and more powerful caliber that you can shoot well. Since most folks shoot hogs at less than 300 yards, I think the .45-70 is a very good choice in this regard. Somebody above mentioned 400 grain bullets for it, which are great, but you can get a bit flatter trajectory and fine accuracy with Leverevolution 325 gr rounds. They are not only accurate (MOA accurate out of Marlin 1895s), but are one of the least expensive hunting rounds. I get about 1900 fps out of my Marlin with these.
People talk about the shield of a hog stopping bullets and apparently this can happen, but I have not see it happen with a proper shot inside 100 yards with .223/5.56 to .45-70. In fact, I have had my .45-70 punch through both sides of a 200+ lb. boar's shields and have seen it with .308 (just not my shot).
.45-70 has quite a bit of recoil, but it isn't horrific. I find it much less bothersome than shooting a 12 ga with slugs (another possible choice for hogs, especially shorter range hunting).
I like hunting with my 5.56 AR15 and most commonly go with CNS shots to the head and it works well, but these are usually at stationary hogs inside 100 yards and often inside 50.
Optics? A lot will work, but what sort of ranges and lighting. You can't go wrong with a good optic that has very high light gathering capability. You can go wrong with any optic that is darker. There are some fine broad daylight scopes and red dots that are not good low light optics and there is a good chance hog hunting will be low light or night hunting.
If low light or night, then you will likely want a light for your rifle (assuming legal in your state). You will need to be able to mount it. That may influence what optic, rail, rings, or rifle you get such that you have another place on the rifle to mount the light.
As a final note, since this is a new endeavor, I would stay way from newer of stranger calibers, not that they aren't fine calibers for the job, but for things like military calibers or classic standbys like the .45-70, ammo can be had at relative bargain prices. So if you end up not liking hog hunting and don't plan on hunting much anyway, you have a gun that will be reasonably less expensive to shoot otherwise and ammo will be widely available.