PW2 edit as previous post of sprite7. Top and bottom margin are OK. But it is not work for left and right margins.

Left/right margin values are cached. Just change "words per line" in Aa menu to one of the other two options and then switch it back to the first one. That should trigger the change.
You only need to do it once after first reboot following the jar edit/replacement.

Editing the first group has no effect. The second one (values 50-100-150), is the right one. Editing both apparently makes no difference with editing just the second.

In addition to the editions referenced by sprite7 in the guide mentioned above, I have also tried to modify the entries "reader.content.leftMargin" and "reader.content.rightMargin", to see if they make any difference in the result. They don't.

Be careful about editing the value of "font.wordsperline.default". I changed it from 30 to 10 just to try, and that bricked my kindle! (I was lucky and could fix it).

My conclusions after those tests, once you edit the jar file, are following:

1. In mobi books (old version, KF7), you can set the new margin but it is reverted to the default one (the small default one, 50 pt or close) every time you turn the page.

2. In azw3 books (or mobi new version, KF8), if you set the new margins, they survive the page turn, but they don't survive a return to the home page. Once you change the book, or even without opening a new book but exiting the book you are reading to the home page, when you go back to read the margins are lost and the default (small one) is set.

That is, in azw3 you must set the margins for each book, which is more or less acceptable. In mobi, you must do it for each page, which is "a little bothering"

When the margins are "automatically resetted" by the kindle, they are the same as shown in the home menu, view list. Maybe the key could be to modify also those, but I haven't tried. I just mention it here in case it could be helpful for someone in the future.

I hope this info could be useful, although the results are a bit disappointing.